-
Notifications
You must be signed in to change notification settings - Fork 539
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
feat: allow disabling auto-instrumentations using env variable #1733
feat: allow disabling auto-instrumentations using env variable #1733
Conversation
|
63e6030
to
2e680ce
Compare
Codecov Report
@@ Coverage Diff @@
## main #1733 +/- ##
==========================================
- Coverage 91.72% 91.68% -0.04%
==========================================
Files 139 139
Lines 7128 7131 +3
Branches 1433 1434 +1
==========================================
Hits 6538 6538
- Misses 590 593 +3
|
While I am pretty happy with provided default instrumentations I would like to be able to disable some of them based on environment variables alone without getting into business of configuring integration manually
2e680ce
to
8907b2b
Compare
@@ -25,8 +25,17 @@ diag.setLogger( | |||
opentelemetry.core.getEnv().OTEL_LOG_LEVEL | |||
); | |||
|
|||
const disabledAutoinstrumentations = ( | |||
process.env.OTEL_DISABLED_AUTOINSTRUMENTATIONS ?? '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This environment variable is not speced. There is the OTEL_SDK_DISABLED
environment variable from spec which I think might be what you are looking for.
However, I think OTEL should be disabled in the SDK level and not in the instrumentations level. Or are you interested in installing an SDK and only having auto instrumentations disabled while allowing manual instrumentation via trace/metrics/logs providers?
What distro are you currently using to instrument your code?
Please let us know if you are still interested in this feature, or if the PR can be closed. Thanks! 🙏 |
@blumamir I'll close this for now. 👍 |
Rationale
While I am pretty happy with provided default instrumentations I would like to be able to disable some of them based on environment variables alone without getting into business of configuring integration manually