Customize opentelemetry-javaagent including library as dependency #6825
Answered
by
laurit
rohitjain010292
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rohitjain010292
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I need to customize default opentelemetry-javaagent to include extra wrapper features.
As per my understanding there are 2 ways of customizing opentelemetry-javaagent.
In this approach, opentelemetry-javaagent library dependency will be:
In my observation, most of the customizations are adopting approach 1. Approach 1 needs dealing with code rebasing and dealing with code conflicts to get updates in opentelemetry-java-instrumentation repo. Whereas with Approach 2, upgrading is just updating the opentelemetry-javaagent library version number.
What is the preferred approach for customizing opentelemetry-javaagent?
Also for Approach 2, will
io.opentelemetry.javaagent.opentelemetry-javaagent
jar dependency be sufficient? This jar includes instrumentation rules classes as shaded classes and uses a custom classloader to load shaded classes. If we added custom instrumentation rules, will they work along with already shaded classes in the library? I don't have good understanding of how classloaders work. So, I am not sure if this works.Please provide your suggestions. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions