-
Notifications
You must be signed in to change notification settings - Fork 895
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
Clarification on OTEL_SDK_DISABLED
scope
#4332
Comments
cc @open-telemetry/python-approvers @open-telemetry/java-approvers |
If you are using the Java autoconfigure module and set |
Thanks for clarifying, @trask. Is there a way for to use the Java SDK without the autoconfigure module? If so, does |
ya, you can use the Java SDK without the autoconfigure module, in which case |
Thanks, @trask! @open-telemetry/python-approvers - Am I reading your code correctly, will |
@trask thinking about your response, and reading the spec, should The way I read it
I understand that if I pass |
I think this falls under (emphasis added) https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#implementation-guidelines:
|
It return no-ops when calling |
@trask - I'm not sure I understand how this answers @danielgblanco's question. Does this mean an implementation can choose to apply an environment variable configuration only in an autoconfiguration component and have no impact on lower-level ways to access the SDK? |
yeah, this is how Java SDK works. the SDK itself has no knowledge of env vars. you have to use a separate autoconfigure module in order to create an instance of the SDK based on env vars there are definitely pros and cons of this approach, I'd probably look at a couple of other language implementations and consider what would be best specifically for Ruby also keep in mind that future otel configuration will be built on top of declarative config in case that has any affect on your thinking |
What are you trying to achieve?
Ruby received a PR to implement the
OTEL_SDK_DISABLED
environment variable, but we're not sure how far the functionality needs to go. The PR as it stands would skip creating providers through configuration, but someone could still manually create functional providers and tracers/meters/loggers. Is that acceptable?Additional context.
Here's the description:
I took a look at open-telemetry/opentelemetry-python#3648, and it seems like they always return no-ops when
OTEL_SDK_DISABLED
is true.However, Java's implementation seems closer to the Ruby PR. Configuration is skipped, but I don't know enough about Java to know if that means you cannot create working tracers, etc.
The text was updated successfully, but these errors were encountered: