opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
Implement ExtendedTextMapGetter in instrumentations
Is your feature request related to a problem? Please describe.
Spec has recently changed to specify extraction of multiple values for a given key: https://github.com/open-telemetry/opentelemetry-specification/pull/4295
The Java SDK has added ExtendedTextMapGetter to handle this: https://github.com/open-telemetry/opentelemetry-java/pull/6852 (when stabilised this extension may become a default method on TextMapGetter which should be then implemented by instrumentations).
Describe the solution you'd like
For instrumentations that have carriers that support multiple values for a single key (most HTTP implementations) this should be a relatively straightforward change.
It does not necessarily need to be supported by all instrumentations.
I have gone through all the instrumentations and found that the following 15 TextMapGetter need to be modified. Can I make all the changes to TextMapGetter in single PR?
@trask
- [x]
io.opentelemetry.instrumentation.grpc.v1_6.GrpcRequestGetterhttps://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13011 - [ ]
io.opentelemetry.javaagent.instrumentation.grizzly.HttpRequestHeadersGetter - [ ]
io.opentelemetry.instrumentation.spring.webmvc.v6_0.JakartaHttpServletRequestGetter - [x]
io.opentelemetry.instrumentation.spring.webmvc.v5_3.JavaxHttpServletRequestGetterhttps://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13027 - [ ]
io.opentelemetry.javaagent.instrumentation.jetty.v12_0.Jetty12TextMapGetter - [x]
io.opentelemetry.instrumentation.kafka.internal.KafkaConsumerRecordGetter - [ ]
io.opentelemetry.javaagent.instrumentation.liberty.dispatcher.LibertyDispatcherRequestGetter - [ ]
io.opentelemetry.instrumentation.awssdk.v2_2.internal.SqsParentContext.MessageAttributeValueMapGetter - [ ]
io.opentelemetry.javaagent.instrumentation.netty.v3_8.server.NettyHeadersGetter - [ ]
io.opentelemetry.instrumentation.ratpack.v1_7.internal.RatpackGetter - [ ]
io.opentelemetry.instrumentation.restlet.v1_1.internal.RestletHeadersGetter - [ ]
io.opentelemetry.instrumentation.restlet.v2_0.internal.RestletHeadersGetter - [ ]
io.opentelemetry.javaagent.instrumentation.servlet.ServletRequestGetter - [ ]
io.opentelemetry.javaagent.instrumentation.undertow.UndertowExchangeGetter - [ ]
io.opentelemetry.instrumentation.spring.webflux.v5_3.WebfluxTextMapGetter
Would this contribution be welcome? @trask
hi @xiepuhuan! yes, let's start with just one (pick any), so we can work through any issues/concerns, and then you could do the rest in a single follow-up PR if you'd like to continue
hi @xiepuhuan! yes, let's start with just one (pick any), so we can work through any issues/concerns, and then you could do the rest in a single follow-up PR if you'd like to continue
Thank you for your reply. I will try to complete the first pull request for ExtendedTextMapGetter.
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13027 has been merged into the main branch. Next, I want to implement ExtendedTextMapGetter in all http server related instrumentations.
@trask
@xiepuhuan sounds great!
#13027 has been merged into the main branch. Next, I want to implement
ExtendedTextMapGetterin all http server related instrumentations.
Hope you didn't start with it as I also implemented these in https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13053
#13027 has been merged into the main branch. Next, I want to implement
ExtendedTextMapGetterin all http server related instrumentations.Hope you didn't start with it as I also implemented these in #13053
Although I have achieved some, I believe your implementation will be better. I plan to implement ExtendedTextMapGetter in the instrumentations of non http servers.