Tomcat instrumentation span names are not updatable from SpanProcessor #7853
Answered
by
laurit
srinusanduri
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
laurit
Feb 20, 2023
Replies: 1 comment
-
See https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/ In tomcat instrumentation we are not able to determine a route so we start the span with a generic name. Later when request processing reaches a framework where we can get a route we'll update the span with a new better name. If you wish to prevent updating the span name you could try using CONTROLLER to prevent further updates.As in sampler you can only use the information that is available when the span is started you are better off using http.target attribute instead of the span name.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
srinusanduri
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/ In tomcat instrumentation we are not able to determine a route so we start the span with a generic name. Later when request processing reaches a framework where we can get a route we'll update the span with a new better name. If you wish to prevent updating the span name you could try using
opentelemetry-java-instrumentation/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpRouteHolder.java
Lines 58 to 60 in b139e1d