quarkus-test-suite
quarkus-test-suite copied to clipboard
Investigate diff in details tracked with graphql using opentracing vs opentelemetry
Investigate diff in details tracked with graphql using opentracing vs opentelemetry
Test: https://github.com/quarkus-qe/quarkus-test-suite/blob/main/http/graphql-telemetry/src/test/java/io/quarkus/ts/http/graphql/telemetry/GraphQLTelemetryIT.java
Spotted by Fedor in https://github.com/quarkus-qe/quarkus-jdkspecifics/pull/77/files#r1198893452
OpenTracing integration was including details about the query in operation name.
Assertions.assertTrue(jsonPath.getList("data[0].spans.operationName").contains("GraphQL:Query.friend"));
Assertions.assertTrue(jsonPath.getList("data[1].spans.operationName").contains("GraphQL:Query.friend_r"));
With OpenTelemetry operationName is either GraphQL (child span) or "POST /graphql"
OpenTracing integration is removed in main / Quarkus 3.1, Quarkus 3.0 or 2.13 needs to be used for comparison
What this issue describes is expected behavior. It comes from OpenTelemetry and there is nothing Quarkus can do about this: https://github.com/quarkusio/quarkus/pull/31356/files
I suggested that if we want to verify details about operation, we should inspect span object and not just operation name. If you are missing attribute missing on Span, we can customize span and add it in Quarkus app.
I mean I'd expect it to be method name or path https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/instrumentation/graphql/ depending on traced operation.
Re-thinking it - maybe there is some flexibility and we should check with upstream developers.
Upstream issue: https://github.com/quarkusio/quarkus/issues/33545
Let's forget about it as we are dropping support for OpenTracing.