opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
Optionally add baggage to span attributes
resolves #4520
Did you consider using a SpanProcessor for this?
@laurit good suggestion, I wasn't aware of that
@laurit updated PR as per your suggestion. I've realised that there is probably an issue with my previous PR for logback MDC in that the "baggage." prefix should be on the key not the value
@adamleantech thanks for reporting, I'll fix it
I wonder if
otel.javaagent.span.add-baggageshould take a list of baggage to add (or*for all), this would matchotel.instrumentation.logback-appender.experimental.capture-mdc-attributes
and maybe we should do the same for otel.instrumentation.logback-mdc.add-baggage?
I'm interested in this same functionality but for use as an AutoConfigureSpi addition to a manually instrumented program (which uses the AutoConfigure SDK extension).
Is there anything which ties AgentTracerProviderConfigurer to the java agent (other than the name?).
Not for this PR obviously, but I wonder if this and AddThreadDetailsSpanProcessor could be relocated into the https://github.com/open-telemetry/opentelemetry-java repo as some sort of sdk-extension-customizer artifact?
Is there anything which ties
AgentTracerProviderConfigurerto the java agent (other than the name?).
Yeah, this configurer is coupled to the agent through the AgentConfig as well...but I think there's room for that to be a separate responsibility (separate PR).
Not for this PR obviously, but I wonder if this and AddThreadDetailsSpanProcessor could be relocated into the https://github.com/open-telemetry/opentelemetry-java repo as some sort of sdk-extension-customizer artifact?
I am liking this idea. @jack-berg and @jkwatson what do you think? Is there room for add-on processors like this in the core repo, or would you prefer to see it as a contrib addition, or something else?
Contrib is the appropriate place for this. If such a processor were to occur in the spec, we could promote that component the core repo.
Has this been contributed to the contrib repo / exists on the java agent?
Has this been contributed to the contrib repo / exists on the java agent?
not yet