Skip to content
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

Named tracers with DiagnosticSources #251

Closed
lmolkova opened this issue Oct 2, 2019 · 2 comments
Closed

Named tracers with DiagnosticSources #251

lmolkova opened this issue Oct 2, 2019 · 2 comments
Assignees

Comments

@lmolkova
Copy link

lmolkova commented Oct 2, 2019

Named tracers being introduces in #239 is intended to provide different behavior for different instrumentations (sampling, filtering, etc)

.NET/Microsoft provided libraries are typically instrumented with DiagnosticSource + Activity. DiagnosticSource already has filtering mechanisms that prevent any instrumentation from happening and performance-wise are better than named tracers.

We should define and implement how they would work together while keeping best performance we could get.

@lmolkova lmolkova mentioned this issue Oct 2, 2019
@lmolkova
Copy link
Author

lmolkova commented Oct 7, 2019

The approach I've been thinking about it:

  • users enable listeners (i.e. OTel collectors per DiagnosticSource) by adding the reference to the collector library + configuring the listener.

  • Listener SHOULD support configuration via tracer instance (named tracer instance) which could be set up by DI or configuration API helpers, It MAY provide configuration through TracerFactory and control category for the tracer.

  • If users want to turn off certain listener they should prefer removing explicit configuration that turns it on rather than suppressing it via Factory/sampling/filter on Span processor

  • If there is auto-instrumentation that brings certain listeners by default and could be changed in runtime, it MUST support config with the TracerFactory but MAY additionally support disabling certain listeners e.g. by package name (or any other name).

  • If users want to provide custom configuration for certain listener, they could create Factory with a specific sampler, processors, exporter, etc... and pass tracer built from this factory to the collector.

Stay tuned for the PRs

@lmolkova lmolkova self-assigned this Oct 7, 2019
@lmolkova
Copy link
Author

this approach is implemented with #266 and #267

Yun-Ting pushed a commit to Yun-Ting/opentelemetry-dotnet that referenced this issue Oct 13, 2022
* Update CHANGELOG for Quartz Instrumentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant