Version Information
Server Version: 2.50.0
Environment
EE
What is the current behaviour?
The OTEL span for when Hasura makes a DB query, e.g. Postgres Query for root field "my_query" currently has a span.kind of internal.
Because of this, and the way Datadog maps OTEL span types to DD span types, the span ends up with a type of custom which breaks OTEL trace => DD database monitoring correlation.
What is the expected behaviour?
As per the semantic conventions, the span.kind for database related spans should be client, as it's not making a call to an in-memory database.
Span kind SHOULD be CLIENT. It MAY be set to INTERNAL on spans representing in-memory database calls. It’s RECOMMENDED to use CLIENT kind when database system being instrumented usually runs in a different process than its client or when database calls happen over instrumented protocol such as HTTP.
How to reproduce the issue?
- Configure https://hasura.io/docs/2.0/observability/opentelemetry/graphql-engine/
- Add the
HASURA_GRAPHQL_ENABLE_QUERY_TRACING: "true" env var
- Execute a query and look at the trace in something like Jaeger
Screenshots or Screencast
Any possible solutions/workarounds you're aware of?
Manually override span.kind to client via OTEL collector
Keywords
- "span.kind"
- "internal span"
Version Information
Server Version: 2.50.0
Environment
EE
What is the current behaviour?
The OTEL span for when Hasura makes a DB query, e.g.
Postgres Query for root field "my_query"currently has aspan.kindofinternal.Because of this, and the way Datadog maps OTEL span types to DD span types, the span ends up with a type of
customwhich breaks OTEL trace => DD database monitoring correlation.What is the expected behaviour?
As per the semantic conventions, the
span.kindfor database related spans should beclient, as it's not making a call to an in-memory database.How to reproduce the issue?
HASURA_GRAPHQL_ENABLE_QUERY_TRACING: "true"env varScreenshots or Screencast
Any possible solutions/workarounds you're aware of?
Manually override
span.kindtoclientvia OTEL collectorKeywords