OTEL_RESOURCE_ATTRIBUTES does not address scoped environment variables #3025
Labels
area:configuration
Related to configuring the SDK
area:sdk
Related to the SDK
spec:resource
Related to the specification/resource directory
Theory
If environment variable is used like dictionary and elements position logically in the different scope, then it makes maintaining of
OTEL_RESOURCE_ATTRIBUTES
very hard.Example of available scopes: machine level, hosting process (console, web server, etc), process.
Example of elements in different logical scope:
service.name
,development.environment
In practice
OTEL_RESOURCE_ATTRIBUTES=service.name
< this is logically close to the process as possible.OTEL_RESOURCE_ATTRIBUTES=development.environment
< this is logically close to the biggest scope possible (eg machine scope).The issue presents only if there are multiple scopes defined. The root cause usually is multiple services per hosting instance, typically a VM based host.
In Windows environment there is the IIS web server, that is used to host multiple web application on single server. It was also common practise to have multiple Windows Service based services in the same machine.
The only known fixes to me are:
OTEL_ENVIRONMENT
).development.environment
which makes high level changes very error prone (same environment can report different environment names in case of an error). If each website is having their own CI/CD pipeline, it makes individual changes extremely hard.The text was updated successfully, but these errors were encountered: