-
Notifications
You must be signed in to change notification settings - Fork 864
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
Change enable property on Instrumenter to a Predicate<Instrumenter> or a Supplier<Boolean> #11927
Comments
Please describe why you would need this. |
In my use case I create the instrumenters, both the ones provided by otel instrumentation and the ones that we develped internally, and I would like to be able to enable or disable a specific Instrumenter at runtime. |
hi @osvaldopina, is this to support dynamic configuration? e.g. #12251 (comment) |
Hi @trask. Yes, that's the goal. |
there's a broader effort happening that I think may address your use case, check out open-telemetry/opentelemetry-java#6687 and #12251 (comment) |
I took a look at the issues you pointed out. The 6687 has a broader effect of enabling or disabling all traces. I need something tied to each instrumenter allowing a much finer control. I saw 12251 and, as it is now, it is a list of intentions and my proposition could address one aspect of it. Looking at 6687 I realize that I can achieve what I need if the final clause is removed from the enabled attribute. |
it is per tracer (i.e. per instrumentation) |
you can see more thoughts about 6687 in the spec work behind it: open-telemetry/opentelemetry-specification#3867 |
Is your feature request related to a problem? Please describe.
Allows a fine grain control over span creation for a Instrumenter.
Describe the solution you'd like
...
private final Predicate<Instrumenter> enabled;
...
...
...
Or
...
private final Supplier<Boolean> enabled;
...
...
...
Describe alternatives you've considered
I could not find any other way to enable or disable Instrumenter span creation on th fly. If there is such a mecanism this feature request would not be necessary.
Additional context
No response
The text was updated successfully, but these errors were encountered: