-
Notifications
You must be signed in to change notification settings - Fork 828
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
Servlet instrumentation ignored when Undertow instrumentation is enabled #6203
Comments
Hey @amoscatelli , |
@mateuszrzeszutek thank you for your answer. No, my traces don't contain that attribute. I enabled agent debugging with : -Dotel.javaagent.debug=true A strange thing is that I see DEBUG logging sent to System.err ... is this done by the agent ? Another strange thing are these lines :
What is happening ? |
Yes, when you run the agent in the debug mode (
There are several "layers" of instrumentations that essentially do very similar things -- for example, we instrument application servers (like tomcat, jetty, undertow), and the servlet API itself. All these instrumentations create
(see the So, what happens, is that the Undertow instrumentation does not set the |
@mateuszrzeszutek thank you again So I can try to disable the undertow instrumentation right ? For me, at the moment, enduser.id information is very important to build my charts. |
Yeah, that should help I think - the servlet instrumentation should kick in once you disable undertow. |
Yea that worked. I think we should leave this issue opened (I'll rename it) to track the bug anyway. Probably the correct behaviour is to have the FIRST (undertow) instrumentation in the stack to open a certain type of span (SERVER in this example), start filling it, while other subsequent instrumentations (like servlet) shoud fill tags in the same span, then at last when we go back to the top of the stack the span is sent by the first instrumentation. |
@amoscatelli could you confirm that it works as expected with latest snapshot from https://oss.sonatype.org/content/repositories/snapshots/io/opentelemetry/javaagent/opentelemetry-javaagent/1.16.0-SNAPSHOT/ |
@laurit yes it works properly using 1.16 thank you |
Describe the bug
I run wildfly with otel java instrumentation and I see traces (for example jdbc traces) on my otel backend. Yet I can't see user.principal in my traces. Shouldn't servlet be instrumented automatically and user.principal added to tags ?
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/466/files#r433592830
Steps to reproduce
Start wildfly with JAVA_TOOL_OPTIONS=-javaagent:/tmp/opentelemetry-javaagent.jar
What did you expect to see?
I expect to see user.principal added to trace
What did you see instead?
No user.principal added to trace
What version are you using?
otel/opentelemetry-collector-contrib:0.53.0
Wildfly 26.0.1
Environment
Centos 7
The text was updated successfully, but these errors were encountered: