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

MDC auto-configuration for Brave and OpenTelemetry #32214

Conversation

marcingrzejszczak
Copy link
Contributor

@marcingrzejszczak marcingrzejszczak commented Sep 1, 2022

A sample with a test that proves that things are working fine mdc-observability.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 1, 2022
@marcingrzejszczak marcingrzejszczak changed the title [Observability] MDC Autoconfiguration for Brave [Observability] MDC Autoconfiguration for Brave and OpenTelemetry Sep 2, 2022
@marcingrzejszczak marcingrzejszczak force-pushed the mdcAutoConfigurationForBrave branch from 9d4bba9 to 04f6e12 Compare September 2, 2022 15:57
@snicoll snicoll changed the title [Observability] MDC Autoconfiguration for Brave and OpenTelemetry MDC auto-configuration for Brave and OpenTelemetry Sep 5, 2022
@marcingrzejszczak marcingrzejszczak force-pushed the mdcAutoConfigurationForBrave branch from 9e9632f to e368abe Compare September 5, 2022 14:58
@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 7, 2022
@wilkinsona wilkinsona added this to the 3.0.x milestone Sep 7, 2022
@marcingrzejszczak marcingrzejszczak force-pushed the mdcAutoConfigurationForBrave branch from e368abe to 337adc5 Compare September 7, 2022 21:47
@@ -34,6 +35,7 @@
*/
@AutoConfiguration(before = MicrometerTracingAutoConfiguration.class)
@Import({ SdkConfiguration.class, TracerConfiguration.class, MicrometerConfiguration.class })
@EnableConfigurationProperties(TracingProperties.class)
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed? It's duplicating the same from TracerConfiguration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TracerConfiguration doesn't have this. After this change it looks exactly the same way as BraveAutoConfiguration looks like

@@ -99,6 +101,12 @@ void shouldBackOffOnCustomBeans() {
});
}

@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(TracingProperties.class)
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit unusual. Why is a user configuration class enabling one of our configuration properties classes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's because Moritz has created a test for a subconfiguration only that now requires the TracingProperties and those are enabled in a higher order configuration.

@wilkinsona
Copy link
Member

Sorry, looks like GitHub has double-posted my latest review comments.

@wilkinsona wilkinsona marked this pull request as draft September 8, 2022 12:17
@marcingrzejszczak marcingrzejszczak force-pushed the mdcAutoConfigurationForBrave branch from f7e165a to a17cdf2 Compare September 9, 2022 14:26
marcingrzejszczak and others added 14 commits September 12, 2022 11:25
Since we used the Context class for Brave tests too (assertThat(Context.current()).isEqualTo(Context.root());) the Context class was loaded during Brave tests which triggered the static initialization of the ContextStorage. At that point since the OTel beans were not created and the ContextStorage wrapper was not registered, OTel defaults  were used instead of ours
@marcingrzejszczak marcingrzejszczak force-pushed the mdcAutoConfigurationForBrave branch from a17cdf2 to ce1d351 Compare September 12, 2022 10:39
@marcingrzejszczak marcingrzejszczak marked this pull request as ready for review September 12, 2022 11:22
@wilkinsona wilkinsona removed the status: waiting-for-feedback We need additional information before we can continue label Sep 12, 2022
@marcingrzejszczak
Copy link
Contributor Author

closing in favour of #32480

@philwebb philwebb removed this from the 3.x milestone Sep 23, 2022
@philwebb philwebb added status: superseded An issue that has been superseded by another and removed type: enhancement A general enhancement labels Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants