This PR migrates .resource.attributes and *.otlp.headers to be key-value pairs instead of objects, and adds a modeling rule to follow this pattern for similar situations in the future. To repeat the reasoning from the modeling rule:
When a type requires a configurable list of name-value pairs (i.e. resource attributes, HTTP headers), model using an array of objects, each with name and value properties. While an arrays of name-value objects is slightly more verbose an object where each key-value is an entry, it is preferred because:
Avoids user input as keys, which ensures conformity with the snake_case properties rule.
Allows both the names and the values to be targets for [env var substitution].
The more I think about it, the more I think this the way the way to go. Note that this is how environment variables are specified in kubernetes manifests, so it shouldn't be particularly foreign to users.
We should get this change in sooner than later to minimize the number of users we expose to churn.
Resolves #72.
May also resolve https://github.com/open-telemetry/opentelemetry-specification/issues/2857.
This PR migrates
.resource.attributes
and*.otlp.headers
to be key-value pairs instead of objects, and adds a modeling rule to follow this pattern for similar situations in the future. To repeat the reasoning from the modeling rule:The more I think about it, the more I think this the way the way to go. Note that this is how environment variables are specified in kubernetes manifests, so it shouldn't be particularly foreign to users.
We should get this change in sooner than later to minimize the number of users we expose to churn.