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

Register tracer to GlobalTracer #80

Open
pavolloffay opened this issue Jul 25, 2018 · 1 comment
Open

Register tracer to GlobalTracer #80

pavolloffay opened this issue Jul 25, 2018 · 1 comment

Comments

@pavolloffay
Copy link
Contributor

@jpkrohling had a great question: why the tracer is not registered into GlobalTracer?

At the moment spec only defines that the tracer should be available via CDI. Here is some documentation of GlobalTracer https://github.com/opentracing/opentracing-java/tree/master/opentracing-util#globaltracer

Benefits

  • implementation of tracer provider could be standardized e.g. smallrye project could provide a basic implementation. The producer would provide GlobalTracer.get() as a bean. Configuration and tracer resolution would still be vendor specific.
  • GlobalTracer is directly provided by OT API and nicely fits into ecosystem of instrumentations

Drawbacks

@jpkrohling
Copy link

The current implementation of the GlobalTracer stores the tracer in a static field, making it tricky to support different concrete tracers for different applications on a single JVM (which is the usual case for application servers).

One possible solution is for runtimes to provide their own tracers and register them with the GlobalTracer. This custom tracer would then retrieve the concrete tracer from, say, the servlet context. This would then require a standard to be set for the servlet context attribute name to store the tracer.

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

2 participants