Clarify parse requirements around null vs. empty #4181
Labels
area:configuration
Related to configuring the SDK
sig-issue
A specific SIG should look into this before discussing at the spec
spec:miscellaneous
For issues that don't match any other spec label
The file config spec says:
This has led to some confusion (see discussion 1) and could use clarification.
Let's illustrate the intent of this statement with some examples:
Example 1
Views have an option to configure the aggregation of the resulting metric stream. Some aggregations like
explicit_bucket_histogram
accept some configurable parameters. Others likedrop
do not. We want users to be able to use the syntax above, and not have to specifydrop: {}
.When the YAML above is parsed,
drop:
resolves tonull
, whiledrop:{}
resolves to an empty object. We need the fact that thedrop
key was provided to be retained after parse. In other words, it would not be acceptable if key/values with anull
value were dropped by parse. It is semantically meaningful that a key was set, even if its value is null.Example 2
The
attribute_value_length_limit
has no default value. If unset, no limit should be imposed on the length of attribute values. In this snippet, we reference theOTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT
env var using the env var substitution syntax. If the env var is unset, we want ensure the resulting SDK is created with no length limit. The result should be equivalent if the the.attribute_limits.attribute_value_length_limit
is omitted altogether.We should clarify the spec to ensure that the behavior in these examples is accomplished.
The text was updated successfully, but these errors were encountered: