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

Support OTEL_SDK_DISABLED #3184

Closed
blakeroberts-wk opened this issue Feb 17, 2023 · 8 comments · Fixed by #3648
Closed

Support OTEL_SDK_DISABLED #3184

blakeroberts-wk opened this issue Feb 17, 2023 · 8 comments · Fixed by #3648

Comments

@blakeroberts-wk
Copy link

Is your feature request related to a problem?
No

Describe the solution you'd like
From the specification on general SDK configuration: OTEL_SDK_DISABLED should, if set to true, disable the SDK for all signals.

Describe alternatives you've considered
N/A

Additional context
The configuration as an environment variable should appear here: https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables.py.

@imadmoussa1
Copy link

is adding this env help to disable sending telemetry ? example when I want to disable generating metrics on local environment

@blakeroberts-wk
Copy link
Author

is adding this env help to disable sending telemetry ? example when I want to disable generating metrics on local environment

Yes.

@lzchen
Copy link
Contributor

lzchen commented Jul 6, 2023

@blakeroberts-wk

Could you provide some context for your use case? Was curious as to why this feature is so requested.

@imadmoussa1
Copy link

For me I am looking for a way to disable sending telemetry when running locally. if there no running OTLP collector running, I have this error : Transient error StatusCode.UNAVAILABLE encountered while exporting traces, retrying in 1s. and keep trying to connect without failing,

@blakeroberts-wk
Copy link
Author

@blakeroberts-wk

Could you provide some context for your use case? Was curious as to why this feature is so requested.

Local development and testing.

In general, unit tests can circumvent the inability to disable the SDK. However, integration tests suffer.

For example, if I have an integration test that attempts to install my service into minikube or kind, the installation will most likely attempt to record and report metrics and fail when the test environment does not have an otel collector running.

@danielnovotny-wf
Copy link

Another use case is being able to selectively disable the SDK for some environments at runtime.

@puskardeb
Copy link
Contributor

@srikanthccv Hello, I have tried to have a go at this issue and raised a PR. Can you please have a look and provide your inputs? Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants