Skip to content

Commit 05695a8

Browse files
committed
[graphql] Change graphql.document requirement level to opt-in
Fixes #2985
1 parent 2e68756 commit 05695a8

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: graphql
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: "Change `graphql.document` attribute requirement level from Recommended to Opt-In due to sensitive data, cardinality, and size concerns"
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [2985]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext: |
23+
The `graphql.document` attribute contains user-inputted data that is often sensitive,
24+
potentially unbounded in length, and high-cardinality. Moving from Recommended to Opt-In
25+
ensures operators make an informed decision before enabling this attribute.
26+
Also updated the note to use SHOULD for stronger normative language regarding sanitization.

docs/graphql/graphql-spans.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ the span SHOULD be named `GraphQL Operation`.
3636

3737
| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
3838
|---|---|---|---|---|---|
39-
| [`graphql.document`](/docs/registry/attributes/graphql.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The GraphQL document being executed. [1] | `query findBookById { bookById(id: ?) { name } }` |
4039
| [`graphql.operation.name`](/docs/registry/attributes/graphql.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the operation being executed. | `findBookById` |
4140
| [`graphql.operation.type`](/docs/registry/attributes/graphql.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The type of the operation being executed. | `query`; `mutation`; `subscription` |
41+
| [`graphql.document`](/docs/registry/attributes/graphql.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The GraphQL document being executed. [1] | `query findBookById { bookById(id: ?) { name } }` |
4242

43-
**[1] `graphql.document`:** The value may be sanitized to exclude sensitive information.
43+
**[1] `graphql.document`:** The value SHOULD be sanitized to exclude sensitive information.
4444

4545
---
4646

docs/registry/attributes/graphql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This document defines attributes for GraphQL.
1515
| <a id="graphql-operation-name" href="#graphql-operation-name">`graphql.operation.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The name of the operation being executed. | `findBookById` |
1616
| <a id="graphql-operation-type" href="#graphql-operation-type">`graphql.operation.type`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The type of the operation being executed. | `query`; `mutation`; `subscription` |
1717

18-
**[1] `graphql.document`:** The value may be sanitized to exclude sensitive information.
18+
**[1] `graphql.document`:** The value SHOULD be sanitized to exclude sensitive information.
1919

2020
---
2121

model/graphql/registry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ groups:
3131
brief: "The GraphQL document being executed."
3232
type: string
3333
stability: development
34-
note: The value may be sanitized to exclude sensitive information.
34+
note: The value SHOULD be sanitized to exclude sensitive information.
3535
examples: 'query findBookById { bookById(id: ?) { name } }'

model/graphql/spans.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ groups:
2424
- ref: graphql.operation.type
2525
requirement_level: recommended
2626
- ref: graphql.document
27-
requirement_level: recommended
27+
requirement_level: opt_in

0 commit comments

Comments
 (0)