Skip to content
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

Traces contain 'q/' part in http.route (and operation name) for system requests in 999-SNAPSHOT #45754

Closed
fedinskiy opened this issue Jan 21, 2025 · 9 comments
Labels
area/tracing kind/bug Something isn't working

Comments

@fedinskiy
Copy link
Contributor

Describe the bug

I have an application, which sends traces for requests to the Jaeger instance, including system calls (with 'q/' prefix in path). In version 3.17.7 tag http.route of these traces contains only path after the /q (eg /arc), but for current Quarkus snapshot it contains the whole path (eg q/arc). This means, that we need to change our search for traces depending on the version of Quarkus used.

Expected behavior

The traces should contain the path without the prefix[1] or the next version should have this behavior described as a breaking change.

[1]

client.address	
127.0.0.1
	
http.request.method	
GET
	
http.response.body.size	
664
	
http.response.status_code	
200
	
http.route	
/arc
	
internal.span.format	
otlp
	
server.address	
localhost
	
server.port	
8080
	
span.kind	
server
	
url.path	
/q/arc
	
url.scheme	
http
	
user_agent.original	
curl/8.9.1
	
Process
host.name	
localhost
	
otel.library.name	
io.quarkus.opentelemetry
	
service.version	
1.0.0-SNAPSHOT
	
telemetry.sdk.language	
java
	
telemetry.sdk.name	
opentelemetry
	
telemetry.sdk.version	
1.42.1
	
webengine.name	
Quarkus
	
webengine.version	
3.17.7

Actual behavior

Traces contain the prefix

client.address	
127.0.0.1
	
http.request.method	
GET
	
http.response.body.size	
707
	
http.response.status_code	
200
	
http.route	
/q/arc
	
internal.span.format	
otlp
	
server.address	
localhost
	
server.port	
8080
	
span.kind	
server
	
url.path	
/q/arc
	
url.scheme	
http
	
user_agent.original	
curl/8.9.1
	
Process
host.name	
localhost
	
otel.library.name	
io.quarkus.opentelemetry
	
service.version	
1.0.0-SNAPSHOT
	
telemetry.sdk.language	
java
	
telemetry.sdk.name	
opentelemetry
	
telemetry.sdk.version	
1.42.1
	
webengine.name	
Quarkus
	
webengine.version	
999-SNAPSHOT

How to Reproduce?

  1. Start a local jaeger instance: podman run -p 16686:16686 -p 4317:4317 quay.io/jaegertracing/all-in-one:1.53.0
  2. clone the reproducer: git clone -b no-q [email protected]:fedinskiy/reproducer.git && cd reproducer
  3. Start the application with Quarkus 3.17.7: mvn clean quarkus:dev -Dquarkus.otel.traces.suppress-non-application-uris=false -Dquarkus.otel.exporter.otlp.traces.endpoint=http://localhost:4317/api/traces -Dquarkus.application.name=old -Dquarkus.platform.version=3.17.7
  4. Do a request: curl http://localhost:8080/q/arc
  5. Restart the app with the latest Quarkus: mvn clean quarkus:dev -Dquarkus.otel.traces.suppress-non-application-uris=false -Dquarkus.otel.exporter.otlp.traces.endpoint=http://localhost:4317/api/traces -Dquarkus.application.name=new -Dquarkus.platform.version=999-SNAPSHOT
  6. Do a request: curl http://localhost:8080/q/arc
  7. Open the Jaeger instance and compare the results for services "old" and "new"

Output of uname -a or ver

6.12.9-200.fc41.x86_64

Output of java -version

23.0.1, vendor: Eclipse Adoptium

Quarkus version or git rev

5534ed1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6

Additional information

No response

@fedinskiy fedinskiy added the kind/bug Something isn't working label Jan 21, 2025
Copy link

quarkus-bot bot commented Jan 21, 2025

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

@gsmet
Copy link
Member

gsmet commented Jan 21, 2025

Yes, this is actually a fix as the previous path was incorrect.

I need to add a note in the migration guide though.

@fedinskiy
Copy link
Contributor Author

fedinskiy commented Jan 21, 2025

@gsmet the test, which detected this didn't change for several years. Was this path incorrect since 2.13?

@brunobat
Copy link
Contributor

Yes, it was incorrect.

@gsmet
Copy link
Member

gsmet commented Jan 21, 2025

@fedinskiy yeah, it has been incorrect since forever.

I fixed it here: #45300 .

And we probably need to discuss backporting at some point.

@gsmet
Copy link
Member

gsmet commented Jan 21, 2025

FYI, I plan to push to at least 3.18. And we might want to discuss the backport to 3.15 at some point.

@gsmet
Copy link
Member

gsmet commented Jan 21, 2025

I added a note in the migration guide.

@gsmet gsmet closed this as completed Jan 21, 2025
fedinskiy added a commit to quarkus-qe/quarkus-test-suite that referenced this issue Jan 22, 2025
michalvavrik pushed a commit to quarkus-qe/quarkus-test-suite that referenced this issue Jan 22, 2025
@fedinskiy
Copy link
Contributor Author

@gsmet you added a note regarding /q/arc, but this change also affects /q/openapi, '/q/swagger-ui/' and, I presume, all others paths, which start with '/q'.

@gsmet
Copy link
Member

gsmet commented Jan 22, 2025

It was an example (thus the technical endpoints such as /q/arc) but I can see how the wording could have been confusing.

I tried to clarify things.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants