-
Notifications
You must be signed in to change notification settings - Fork 853
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
Server Instrumentation of io.opentelemetry.netty-4.1 populates tag http.route always with / only #7350
Comments
attaching the Trace (exported from jaeger, as JSON format): |
Netty is low level framework that does not provide mappings that could be used for route. |
Should this be added by Quarkus or by Web MVC which was used by my code? |
@brunobat we're trying to run Quarkus and OTEL but currently the Span name and http.route attribute are contextless. |
Actually, there is one already: |
@brunobat , @laurit - just to emphasize I'm using the java agent (auto instrumentation) |
@arik-dig not sure you will ever be able to get the http.route with Netty alone. |
@arik-dig Quarkus allows you to mix reactive and imperative programming paradigms. Preserving the OTel context when switching between those 2 worlds is very complex and not properly handled by the agent. |
@brunobat thanks for the info |
@brunobat can you open an issue and post a repro of a context switching issue so we can investigate from the agent side? thx! |
@trask , @mateuszrzeszutek - this issue is not directly related to Quarkus. |
@arik-dig can you post a small repro of the issue? generally |
@trask I've provided a repro - using Quarkus app (Spring WEB) with OTEL agent (see in the description). |
thx @arik-dig, I was able to repro, it looks like quarkus supports spring annotations, but has its own routing implementation (instead of using spring mvc routing, which is what we currently instrument). |
I checked and the repro is not losing the context, as I was able to update the netty span name manually inside of the controller method, e.g.
@brunobat we would really appreciate if you can provide a repro of the issue(s) you have seen so we can look into them, thx! |
@trask I'm not sure. |
is this the issue you're facing? quarkusio/quarkus#29297 |
@trask I think that quarkus people can answer it better. |
We need to re-visit the fundamentals of this issue and what we want to achieve.
@arik-dig can you please re-write the issue so the scope and purpose are clarified? |
@brunobat this is not true from the agent side at least, while we love that Quarkus has native instrumentation and we highly recommend using it, we do support Quarkus users who need to use the agent for some reason, e.g. they are instrumenting an existing app, or they need auto-instrumentation of additional libraries. But I do agree that we need clarification here @arik-dig about whether you are using the agent or not. And both the agent and Quarkus have made improvements in this area since this issue was opened:
So it would be helpful if you can check if your issue still exists using the latest version of whichever path you are taking. |
That's fine Trask.
|
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed automatically if there is no response from the author within 7 additional days from this comment. |
Describe the bug
Server instrumentation library
io.opentelemetry.netty-4.1
using java agent sets theSpan name
and populate the taghttp.route
always as /while ignoring the declaration of the Controller mapping
Steps to reproduce
using project https://github.com/quarkusio/quarkus-quickstarts/tree/main/spring-web-quickstart
which contains spring controller:
I ran the project using the agent:
and browsed locally to http://localhost:8080/greeting/mark
What did you expect to see?
http.route
should be /greeting/{name}What did you see instead?
http.route
is /What version are you using?
java agent 1.20.2-alpha
Environment
Compiler: Oracle JDK 17
OS : Windows 11
Runtime : Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 17.0.5+9-LTS-191
OS : Windows 11
Additional context
The text was updated successfully, but these errors were encountered: