-
Notifications
You must be signed in to change notification settings - Fork 624
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
Comments
is adding this env help to disable sending telemetry ? example when I want to disable generating metrics on local environment |
Yes. |
Could you provide some context for your use case? Was curious as to why this feature is so requested. |
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 : |
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. |
Another use case is being able to selectively disable the SDK for some environments at runtime. |
@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 |
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.
The text was updated successfully, but these errors were encountered: