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

feat!: Update GraphQL span name convention #1389

Merged
merged 9 commits into from
Oct 10, 2024
4 changes: 4 additions & 0 deletions .chloggen/update-graphql-span-name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: breaking
kaylareopelle marked this conversation as resolved.
Show resolved Hide resolved
component: graphql
note: Update the GraphQL Span name convention
issues: [1361]
16 changes: 12 additions & 4 deletions docs/graphql/graphql-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ linkTitle: GraphQL Server
This document defines semantic conventions to apply when instrumenting the GraphQL implementation. They map GraphQL
operations to attributes on a Span.

The **span name** MUST be of the format `<graphql.operation.type> <graphql.operation.name>` provided that
`graphql.operation.type` and `graphql.operation.name` are available. If `graphql.operation.name` is not available, the
span SHOULD be named `<graphql.operation.type>`. When `<graphql.operation.type>` is not available, `GraphQL Operation`
MAY be used as span name.
The **span name** SHOULD be of the format `{graphql.operation.type}` provided
`graphql.operation.type` is available. If `graphql.operation.type` is not available,
the span SHOULD be named `GraphQL Operation`.

> **Warning**
> The `graphql.operation.name` value is provided by the client and can have high
> cardinality. Using it in the GraphQL server span name (by default) is
> NOT RECOMMENDED.
>
> Instrumentation MAY provide a configuration option to enable a more descriptive
> span name following `{graphql.operation.type} {graphql.operation.name}` format
> when `graphql.operation.name` is available.

<!-- semconv graphql -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down
Loading