Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Env var resource configuration should be RECOMMENDED and not optional #3929

Open
lmolkova opened this issue Mar 7, 2024 · 3 comments
Open
Labels
area:configuration Related to configuring the SDK area:sdk Related to the SDK spec:miscellaneous For issues that don't match any other spec label spec:resource Related to the specification/resource directory triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor

Comments

@lmolkova
Copy link
Contributor

lmolkova commented Mar 7, 2024

What are you trying to achieve?

I'd like to be able to configure common OTel resource attributes via environment variables in the same way across different languages.
Currently env var configuration is completely optional:

Implementations MAY choose to allow configuration via the environment variables in this specification, but are not required to.

At the same time some env vars are supported by virtually all SDKs:

https://github.com/open-telemetry/opentelemetry-specification/blob/ff66b248d5f746651008fb87ce7d672d12991a96/spec-compliance-matrix.md#environment-variables

This is problematic when configuring polyglot applications, writing docs for native instrumentations, etc.

Having OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES as RECOMMENDED would solve most of my concerns.

Additional context.

See also open-telemetry/opentelemetry.io#4059, open-telemetry/opentelemetry-cpp#2559

@lmolkova lmolkova added the spec:miscellaneous For issues that don't match any other spec label label Mar 7, 2024
@lmolkova lmolkova changed the title Env var resource configuration should is be RECOMMENDED and not optional Env var resource configuration should be RECOMMENDED and not optional Mar 7, 2024
@arminru arminru added area:configuration Related to configuring the SDK spec:resource Related to the specification/resource directory area:sdk Related to the SDK labels Mar 12, 2024
@cijothomas
Copy link
Member

Agree with this. However, this will be useful only if spec also clarifies ENV or code takes precedence. That does not seem to enforced by spec, leading to each languages doing it in-consistently.

@austinlparker austinlparker added the sig-issue A specific SIG should look into this before discussing at the spec label Apr 9, 2024
@tigrannajaryan tigrannajaryan added the triage:accepted:ready Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor label Apr 19, 2024
@jack-berg jack-berg added triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor and removed triage:accepted:ready Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor labels Apr 19, 2024
@jack-berg
Copy link
Member

Removing from the file configuration project as this is not related to file configuration. There is currently no general purpose configuration project board.

@dyladan
Copy link
Member

dyladan commented May 21, 2024

@jack-berg in our triage meetings we've added a couple things to the file config board like this that aren't specifically about the config format but are a use case that needs to be considered. It also has a dependency on file config before it can be worked on. We didn't really have another place to put it.

@austinlparker austinlparker moved this to Spec - Accepted in 🔭 Main Backlog Jul 16, 2024
@trask trask removed the sig-issue A specific SIG should look into this before discussing at the spec label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:configuration Related to configuring the SDK area:sdk Related to the SDK spec:miscellaneous For issues that don't match any other spec label spec:resource Related to the specification/resource directory triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor
Projects
Status: Spec - Accepted
Development

No branches or pull requests

8 participants