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

Autoclose TracerProvider in Spring-Boot Application #5124

Closed
frommeyerc opened this issue Jan 14, 2022 · 1 comment
Closed

Autoclose TracerProvider in Spring-Boot Application #5124

frommeyerc opened this issue Jan 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@frommeyerc
Copy link
Contributor

Is your feature request related to a problem? Please describe.
According to SdkTracerProvider#close() JavaDoc this method should be called before the application is shut down in order to make sure all spans are reported. With the current spring-boot autoconfig this is not the case.

Describe the solution you'd like
While the current autoconfiguration create the SdkTracerProvider as a POJO baked into the OpenTelemetry @Bean it should become a @Bean in it's own right. This will allow the Spring-Context to call it's #close() method when the Context is destroyed.

Describe alternatives you've considered
As there seam to be no other @Beans that would do the shutdown instead I didn't see another option.

I'm already preparing a PR for this change.

@trask
Copy link
Member

trask commented Jan 20, 2022

Closed by #5125

@trask trask closed this as completed Jan 20, 2022
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this issue May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants