quarkus-test-suite icon indicating copy to clipboard operation
quarkus-test-suite copied to clipboard

Investigate diff in details tracked with graphql using opentracing vs opentelemetry

Open rsvoboda opened this issue 2 years ago • 4 comments

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

rsvoboda avatar May 19 '23 12:05 rsvoboda

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.

michalvavrik avatar May 19 '23 14:05 michalvavrik

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.

michalvavrik avatar May 19 '23 14:05 michalvavrik

Re-thinking it - maybe there is some flexibility and we should check with upstream developers.

michalvavrik avatar May 20 '23 21:05 michalvavrik

Upstream issue: https://github.com/quarkusio/quarkus/issues/33545

fedinskiy avatar May 23 '23 08:05 fedinskiy

Let's forget about it as we are dropping support for OpenTracing.

michalvavrik avatar Jun 06 '24 23:06 michalvavrik