GlobalTracer breaks tests because it can be initialized only once
See original GitHub issueGlobalTracer.register
throws an exception when called again with another tracer instance. It makes unit tests fail if they happen to initialize GlobalTracer.
Has anyone run into this problem? I could run tests in separate JVM instances, but I’d rather not. Maybe adding a “reset” method would make it easier to use for testing purposes?
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (15 by maintainers)
Top Results From Across the Web
c# - Design issue: static class only initializes once, breaks unit ...
I would have a problem even without the Null test, because Configuration probably (I'm guessing) gets initialized once for all classes that use ......
Read more >All configuration options - Quarkus
AWS Lambda Type Default
AWS Lambda Common Type Default
AWS Lambda Gateway REST API Type Default
Agroal ‑ Database connection pool Type Default
Read more >datadog_trace Changelog - PECL - PHP
This removes one step in onboarding as the environment variable DD_PROFILING_ENABLED no longer needs to be set to 1, which can be difficult...
Read more >8.4.1 Patch Resolved Issues - Pega Community
is a limit on the amount of cell styles, once the number of rows in the file was ... keydown handler for the...
Read more >Distributing Tracing Lab - Java
The solution to the lab is located in the directory lab-jaeger-java/solution ... we used this endpoint in the previous section but called it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I always like making exceptions more helpful to the users. If this is a common scenario in tests, we should probably extend the exception message to say “if you are getting this exception when running unit tests, see {url}” and link to the doc explaining how tests should be written.
I think we should rather provide
reset
method directly on theGlobalTracer
. It will make things much simpler, consumers should understand implications when calling it.