MDC auto-configuration for Brave and OpenTelemetry#32214
Closed
marcingrzejszczak wants to merge 19 commits intospring-projects:mainfrom
Closed
MDC auto-configuration for Brave and OpenTelemetry#32214marcingrzejszczak wants to merge 19 commits intospring-projects:mainfrom
marcingrzejszczak wants to merge 19 commits intospring-projects:mainfrom
Conversation
9d4bba9 to
04f6e12
Compare
wilkinsona
requested changes
Sep 5, 2022
...java/org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryConfigurations.java
Outdated
Show resolved
Hide resolved
...main/java/org/springframework/boot/actuate/autoconfigure/tracing/BraveAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...main/java/org/springframework/boot/actuate/autoconfigure/tracing/BraveAutoConfiguration.java
Outdated
Show resolved
Hide resolved
spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle
Outdated
Show resolved
Hide resolved
9e9632f to
e368abe
Compare
e368abe to
337adc5
Compare
wilkinsona
reviewed
Sep 8, 2022
| */ | ||
| @AutoConfiguration(before = MicrometerTracingAutoConfiguration.class) | ||
| @Import({ SdkConfiguration.class, TracerConfiguration.class, MicrometerConfiguration.class }) | ||
| @EnableConfigurationProperties(TracingProperties.class) |
Member
There was a problem hiding this comment.
Why is this needed? It's duplicating the same from TracerConfiguration.
Contributor
Author
There was a problem hiding this comment.
TracerConfiguration doesn't have this. After this change it looks exactly the same way as BraveAutoConfiguration looks like
wilkinsona
requested changes
Sep 8, 2022
...main/java/org/springframework/boot/actuate/autoconfigure/tracing/BraveAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...java/org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryConfigurations.java
Outdated
Show resolved
Hide resolved
...java/org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryConfigurations.java
Outdated
Show resolved
Hide resolved
...java/org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryConfigurations.java
Outdated
Show resolved
Hide resolved
...java/org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryConfigurations.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java
Show resolved
Hide resolved
...ain/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinProperties.java
Outdated
Show resolved
Hide resolved
...va/org/springframework/boot/actuate/autoconfigure/tracing/BaggageAutoConfigurationTests.java
Outdated
Show resolved
Hide resolved
...va/org/springframework/boot/actuate/autoconfigure/tracing/BaggageAutoConfigurationTests.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| @Configuration(proxyBeanMethods = false) | ||
| @EnableConfigurationProperties(TracingProperties.class) |
Member
There was a problem hiding this comment.
This is a bit unusual. Why is a user configuration class enabling one of our configuration properties classes?
Contributor
Author
There was a problem hiding this comment.
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.
Member
|
Sorry, looks like GitHub has double-posted my latest review comments. |
f7e165a to
a17cdf2
Compare
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
a17cdf2 to
ce1d351
Compare
2 tasks
Contributor
Author
|
closing in favour of #32480 |
This was referenced Sep 23, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A sample with a test that proves that things are working fine mdc-observability.zip