Embed the external jar which has custom logic to capture additional attributes along with telemetry data like traces, metrics etc in a Spring boot App without making any code changes in the app #9503
Unanswered
MadhusudanN
asked this question in
Q&A
Replies: 2 comments
-
moving this over to the instrumentation repository, as a more appropriate place for discussion |
Beta Was this translation helpful? Give feedback.
0 replies
-
you may be able to write an extension to implement this, something like https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/examples/extension/src/main/java/com/example/javaagent/instrumentation/DemoServlet3Instrumentation.java |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Requirement ::
I have a spring boot java application which has filters for authentication, checks on headers and body, logging requests etc.. The requirement is to come up with a filter which captures additional information from the http request attributes, add it to the baggage and set in current span context using the open telemetry SDK. But this filter should not reside in application code, this should be an external jar so that this can be plugged into any spring boot java application.
Constraints ::
There should not be any code changes in the consuming java application which embeds this new filter.
Initial thoughts ::
Spring boot provides capability to scan for packages in classpath using @SpringBootApplication(scanBasePackages = {"com.test"}) but still this will need a code change.
Suggestion Needed ::
Can someone please let me know is there any way open telemetry auto / manual instrumentation can help so that without any code changes in the consuming spring boot app we can embed the jar.
Beta Was this translation helpful? Give feedback.
All reactions