-
Notifications
You must be signed in to change notification settings - Fork 791
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
Apply micrometer instrumentation to spring-boot-actuator apps #5666
Apply micrometer instrumentation to spring-boot-actuator apps #5666
Conversation
helperResourceBuilder.registerForAllClassLoaders( | ||
"io/opentelemetry/javaagent/instrumentation/spring/actuator/OpenTelemetryMeterRegistryAutoConfiguration.class"); |
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.
I used a bit different way of making that class visible to spring class loaders; maybe it'll be useful in other spring instrumentations too.
(Also, an interesting bit: no need to explicitly pass .classdata
here, the AgentClassLoader
will add the suffix automatically when it's asked to get a .class
resource)
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.
💯
7ab033a
to
77a38a6
Compare
No attribution needed. I hereby contribute it to OpenTelemetry under the CLA. |
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.
that was a hard read and I wrote some of it 😅
javaagent-bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/HelperResources.java
Outdated
Show resolved
Hide resolved
helperResourceBuilder.registerForAllClassLoaders( | ||
"io/opentelemetry/javaagent/instrumentation/spring/actuator/OpenTelemetryMeterRegistryAutoConfiguration.class"); |
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.
💯
...avaagent/instrumentation/spring/actuator/AutoConfigurationImportSelectorInstrumentation.java
Outdated
Show resolved
Hide resolved
💯 |
…elemetry#5666) * Apply micrometer instrumentation to spring-boot-actuator apps * fix a bug * code review comments
This is heavily based on the ApplicationInsights micrometer instrumentation. @trask should I include some additional attribution in the code?
Resolves #5536