-
Notifications
You must be signed in to change notification settings - Fork 913
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
fix micrometer bridge auto configuration annotation #13083
fix micrometer bridge auto configuration annotation #13083
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think a test could be added for this?
yes - I even found the test that I broke with this PR. |
a888249
to
b9a2ab1
Compare
instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
...aagent/instrumentation/spring/actuator/v2_0/OpenTelemetryMeterRegistryAutoConfiguration.java
Outdated
Show resolved
Hide resolved
0f347b6
to
84abdcc
Compare
testing { | ||
suites { | ||
val testPrometheus by registering(JvmTestSuite::class) { | ||
dependencies { | ||
runtimeOnly("io.micrometer:micrometer-registry-prometheus:1.14.3") | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since there are no source for this suite it won't run any tests as far as I can tell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - I had to test this by adding id("com.adarshr.test-logger") version "4.0.0"
to see that noting gets executed...
used the setup for stable semconv now
.../test/java/io/opentelemetry/javaagent/instrumentation/spring/actuator/v2_0/ActuatorTest.java
Outdated
Show resolved
Hide resolved
.../test/java/io/opentelemetry/javaagent/instrumentation/spring/actuator/v2_0/ActuatorTest.java
Outdated
Show resolved
Hide resolved
Exception
|
I can't reproduce the error locally with @laurit can you help? |
For met it repros fine. I think the problem is in |
@@ -32,4 +40,30 @@ public class OpenTelemetryMeterRegistryAutoConfiguration { | |||
public MeterRegistry otelMeterRegistry() { | |||
return MicrometerSingletons.meterRegistry(); | |||
} | |||
|
|||
@Bean | |||
static BeanPostProcessor postProcessCompositeMeterRegistry() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a convention of making these methods public
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other bean post processor is also static:
Line 34 in 428aa28
static DataSourcePostProcessor dataSourcePostProcessor( |
thanks - I'll try with |
apparently that worked @laurit I'm hoping that this also makes sense 😄 |
...aagent/instrumentation/spring/actuator/v2_0/OpenTelemetryMeterRegistryAutoConfiguration.java
Outdated
Show resolved
Hide resolved
…javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/actuator/v2_0/OpenTelemetryMeterRegistryAutoConfiguration.java Co-authored-by: Trask Stalnaker <[email protected]>
Fixes #12719 - hopefully