Skip to content
Discussion options

You must be logged in to vote

You could use the experimental https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizerProvider.java api to add an AttributesExtractor that provides the value you wish to add. This will add the the attribute to the span, to add it to the metric you will need to configure a metric view https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/incubator that includes the new attribute. Currently you can decide whether to customize an instrumenter based on the instrumentation name

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AndresBena19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants