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

Clarification on OTEL_SDK_DISABLED scope #4332

Open
kaylareopelle opened this issue Dec 10, 2024 · 5 comments
Open

Clarification on OTEL_SDK_DISABLED scope #4332

kaylareopelle opened this issue Dec 10, 2024 · 5 comments
Labels
spec:miscellaneous For issues that don't match any other spec label triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted triage:followup Needs follow up during triage

Comments

@kaylareopelle
Copy link

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:

Boolean value. If “true”, a no-op SDK implementation will be used for all telemetry signals. Any other value or absence of the variable will have no effect and the SDK will remain enabled. This setting has no effect on propagators configured through the OTEL_PROPAGATORS variable.

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.

@MrAlias
Copy link
Contributor

MrAlias commented Dec 10, 2024

cc @open-telemetry/python-approvers @open-telemetry/java-approvers

@trask
Copy link
Member

trask commented Dec 10, 2024

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.

If you are using the Java autoconfigure module and set OTEL_SDK_DISABLED=true then none of the autoconfigure callbacks to customize the OpenTelemetry SDK are called, and so there's no way to add your own tracers etc.

@trask trask added the triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted label Dec 10, 2024
@kaylareopelle
Copy link
Author

If you are using the Java autoconfigure module and set OTEL_SDK_DISABLED=true then none of the autoconfigure callbacks to customize the OpenTelemetry SDK are called, and so there's no way to add your own tracers etc.

Thanks for clarifying, @trask. Is there a way for to use the Java SDK without the autoconfigure module? If so, does OTEL_SDK_DISABLED have any impact on that path?

@trask
Copy link
Member

trask commented Dec 11, 2024

ya, you can use the Java SDK without the autoconfigure module, in which case OTEL_SDK_DISABLED has no effect

@kaylareopelle
Copy link
Author

Thanks, @trask!

@open-telemetry/python-approvers - Am I reading your code correctly, will OTEL_SDK_DISABLED create no-ops for all attempts at creating tracer providers, etc.?

@github-actions github-actions bot added the triage:followup Needs follow up during triage label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:miscellaneous For issues that don't match any other spec label triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted triage:followup Needs follow up during triage
Projects
None yet
Development

No branches or pull requests

3 participants