-
Notifications
You must be signed in to change notification settings - Fork 636
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
auto-instrumentation should have a way to disable specific instrumentations #1240
Comments
I will claim this issue. Thanks! |
@owais do you we need to give an extra option from command line as well |
@dmarar I think that would be great to have but feel free to add it as a separate issue if you want to keep the initial PR simple. |
sure @owais . will create a new PR for it. |
This issue was marked stale due to lack of activity. It will be closed in 30 days. |
Fixed in #1461 |
opentelemetry-instrument
command automatically instruments all supported packages. Sometimes it is useful to temporarily disable an instrumentation. Right now the only way to do this is to uninstall the instrumentation package you want to disable. This can be inconvenient especially when the instrument command is coupled with bootstrap command.Consider an application shipped as a docker container where the docker image does something like the following:
If the user wants to disable a specific instrumentation, they'll have to modify the docker image to add a
pip uninstall
after the bootstrap command. This can be very inconvenient in the best case and impossible in the worst case.It'd be far simpler if the user could run the container with
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=psycopg2
to disable a specific instrumentation (psycopg2 in this example) without having to modify the image and rebuild the containers.This highlights docker as an example but same issue applies to almost all other deployment scenarios.
Another situation this can be very helpful in is when a user is running off the shelf software that happens to be instrumented with OpenTelemetry Python. User might not be able or willing to fork/modify the product just to disable an instrumentation while adding an environment variable would be trivial.
The text was updated successfully, but these errors were encountered: