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

SdkTracerProvider auto closed as separate Context Bean (#5124) #5125

Merged
merged 1 commit into from
Jan 20, 2022
Merged

SdkTracerProvider auto closed as separate Context Bean (#5124) #5125

merged 1 commit into from
Jan 20, 2022

Conversation

frommeyerc
Copy link
Contributor

Providing the SdkTracerProvider as a separate @Bean allows to auto close it together with the Spring-Context. This change also allows to provide a custom SdkTracerProvider if desired. If a user intends to simply create a custom OpenTelemetry object with an arbitrary SkdTracerProvider non of both will be auto created.

@frommeyerc frommeyerc requested a review from a team as a code owner January 14, 2022 11:24
@ConditionalOnMissingBean(OpenTelemetry.class)
public static class OpenTelemetryBeanConfig {

@Bean(destroyMethod = "close")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIU, close will be called automatically without needing to set it here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like there's one other place with destroyMethod = "close", going to merge and I'll send a separate PR to update both spots

@trask trask merged commit d017d5f into open-telemetry:main Jan 20, 2022
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants