-
Notifications
You must be signed in to change notification settings - Fork 867
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
OpenTelemetry should not fail on context reloads #3841
Comments
Interesting. I suspect that the spring integration shouldn't be setting the global at all. |
I'm not too familiar with how the reload works but am reading this It seems to imply that only projects open in the IDE are loaded in the restart classloader. Since we'd expect our library to be included as a build dependency jar, it should be in the base classloader. Any idea why the Otel configuration is restarted or an approach to prevent it? |
@frommeyerc can you provide a repro for this issue that we can use to investigate? |
I should be able to compile s.th. in a couple of days. |
I created a repository here: https://github.com/frommeyerc/otel-demo/tree/master/opentelemetry-refresh
from the command line it will start on port 8080. If you modify the code it will automatically try to reload the context and fail with an exception. |
Co-authored-by: Trask Stalnaker <[email protected]>
Fixed by #4051 |
Describe the bug
When using the spring-autoconfiguration integration and restarting the spring context (e.g. user spring-dev-tools) the new context fails to start. the reason is that the open-tracing integration tries to create and register a new version of the opentracing sdk. As this is build as enforced singleton an exception is thrown.
Interestingly there is a method called
#resetForTest()
that actually nulls the static field holding the globalOpenTelemetry.Steps to reproduce
What did you expect to see?
I expected the context to come up again without issue.
What did you see instead?
The context failing with a BeanInstatiationException
What version are you using?
1.4.1-alpha
Environment
Compiler: Eclipse Java 11
OS: "Ubuntu 20.04"
The text was updated successfully, but these errors were encountered: