-
Notifications
You must be signed in to change notification settings - Fork 839
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
Add experimental updateTracerConfigurations for dynamically updateable on/off instrumentation #6899
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6899 +/- ##
============================================
- Coverage 90.30% 90.25% -0.06%
- Complexity 6594 6595 +1
============================================
Files 729 729
Lines 19784 19799 +15
Branches 1945 1945
============================================
+ Hits 17866 17869 +3
- Misses 1325 1338 +13
+ Partials 593 592 -1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Thanks for starting to think about this. I think we need to have an API that solves the dynamic config problem for generically, rather than focusing specifically on tracer config. What do you think about something like this: jack-berg@f74db3e#diff-8a27a2383ac52aa80c19c1c9789bf6c91e2c336c702f9bb4943e5e8cce7d07e0R103-R129 Demonstrated in a test here: jack-berg@f74db3e#diff-cb1bd4f971c5bffe08539f05be0e05fe0750268975f448c45dcd78debd6775ecR257-R278 having a |
Per our conversation in yesterday's SIG about having scope config part of declarative configuration, I've opened this PR: open-telemetry/opentelemetry-configuration#140 |
This enables dynamic config - it's all that is needed at the experimental level. For the complete solution it would be a
TracerProvider.updateTracerConfigurations()
interface method addition.A usage example is https://github.com/elastic/elastic-otel-java/blob/main/custom/src/main/java/co/elastic/otel/config/DynamicInstrumentation.java
Essentially, the configuration is set with an updatable ScopeConfigurator (see below fragment), then that can be updated at any time with eg
GlobalOpenTelemetry.getTracerProvider().updateTracerConfigurations()
I haven't added implementations for
DefaultTracerProvider
andExtendedDefaultTracerProvider
nor tests, because I feel this is fine for the experimental stage, but those could be added easily