-
Notifications
You must be signed in to change notification settings - Fork 992
Support extensions for attributesExtractors, contextCustomizers, operationListeners and spanNameExtractor #13917
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
Support extensions for attributesExtractors, contextCustomizers, operationListeners and spanNameExtractor #13917
Conversation
...api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java
Outdated
Show resolved
Hide resolved
...api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java
Outdated
Show resolved
Hide resolved
...api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java
Outdated
Show resolved
Hide resolved
...in/java/io/opentelemetry/instrumentation/api/instrumenter/AttributesExtractorCustomizer.java
Outdated
Show resolved
Hide resolved
...main/java/io/opentelemetry/instrumentation/api/instrumenter/ContextCustomizerCustomizer.java
Outdated
Show resolved
Hide resolved
...main/java/io/opentelemetry/instrumentation/api/instrumenter/ContextCustomizerCustomizer.java
Outdated
Show resolved
Hide resolved
We have a similar need (#13961). However, in our case we do not care about the specific server instrumentation. in our case we would like to have a header getter injected. |
...i/src/main/java/io/opentelemetry/instrumentation/api/internal/InstrumentationCustomizer.java
Outdated
Show resolved
Hide resolved
...ation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/ServiceLoaderUtil.java
Outdated
Show resolved
Hide resolved
0708c7d
to
f11181d
Compare
...es/distro/custom/src/main/java/com/example/javaagent/DemoInstrumenterCustomizerProvider.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
Outdated
Show resolved
Hide resolved
Open questions:
|
I think it's necessary to support distinguishing the type of instrumenter in same instrumentation. I are willing to explore related solution later. How about supporting it in a follow-up PR and providing current abilities for users firstly? I have refactored our inner Distro recently, I might need a bit more time to get started.
Sorry, I am not very clear about this point. Could you elaborate more about its background or purpose?
For this point, In fact, I haven't encouraged related requirement so far. I can file an issue to contain it and point one and set corresponding order. We could support them by order and requirement? I created a follow-up issue to track above potential requirements #14424 |
sure we can do it later
Instrumentations are usually loaded into the class loader that hosts the instrumented library, but customizer is in the agent class loader. Lets assume that you are trying to customize apache http client 5.0 In https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/apache-httpclient/apache-httpclient-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v5_0/ApacheHttpClientHttpAttributesGetter.java request is |
Make sense! That is really a limitation for usage. There doesn't seem to be a good way to solve it. Is it necessary to highlight this point in the related example documentation? |
Resolved #12250