Skip to content

add sampling_relevant marker to graphql.operation.type on server span#71

Merged
PascalSenn merged 1 commit intomainfrom
pse/enabled-sampling
Mar 7, 2026
Merged

add sampling_relevant marker to graphql.operation.type on server span#71
PascalSenn merged 1 commit intomainfrom
pse/enabled-sampling

Conversation

@PascalSenn
Copy link
Contributor

@PascalSenn PascalSenn commented Mar 6, 2026

Mark graphql.operation.type as sampling_relevant: true on the span.graphql.server span, enabling head-based samplers to makedecisions based on operation type (query/mutation/subscription).

This follows the pattern from HTTP (http.request.method), DB (db.operation.name), and GenAI (gen_ai.operation.name) where the primary operation classifier on the root span is marked as sampling
relevant. Internal spans are not marked since they inherit the sampling decision from the root span.

…r span

Mark `graphql.operation.type` as `sampling_relevant: true` on the
`span.graphql.server` span, enabling head-based samplers to make
decisions based on operation type (query/mutation/subscription).

This follows the pattern from HTTP (`http.request.method`), DB
(`db.operation.name`), and GenAI (`gen_ai.operation.name`) where the
primary operation classifier on the root span is marked as sampling
relevant. Internal spans are not marked since they inherit the sampling
decision from the root span.
@PascalSenn PascalSenn changed the title feat: add sampling_relevant marker to graphql.operation.type on server span add sampling_relevant marker to graphql.operation.type on server span Mar 7, 2026
@PascalSenn PascalSenn merged commit 3b25db7 into main Mar 7, 2026
2 checks passed
@PascalSenn PascalSenn deleted the pse/enabled-sampling branch March 7, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant