Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Jun 2, 2022
1 parent 717872f commit c28b5ab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
15 changes: 13 additions & 2 deletions semantic_conventions/trace/instrumentation/graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@ groups:
examples: 'findBookById'
- id: operation.type
brief: "The type of the operation being executed."
type: string
examples: ['QUERY', 'MUTATION', 'SUBSCRIPTION']
type:
allow_custom_values: false
members:
- id: query
value: "query"
brief: "GraphQL query"
- id: mutation
value: "mutation"
brief: "GraphQL mutation"
- id: subscription
value: "subscription"
brief: "GraphQL subscription"
examples: ['query', 'mutation', 'subscription']
- id: operation.body
brief: "The GraphQL query being executed."
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ MAY be used as span name.
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `graphql.operation.name` | string | The name of the operation being executed. | `findBookById` | No |
| `graphql.operation.type` | string | The type of the operation being executed. | `QUERY`; `MUTATION`; `SUBSCRIPTION` | No |
| `graphql.operation.type` | string | The type of the operation being executed. | `query`; `mutation`; `subscription` | No |
| `graphql.operation.body` | string | The GraphQL query being executed. [1] | `query findBookById { bookById(id: ?) { name } }` | No |

**[1]:** The value may be sanitized to exclude sensitive information.

`graphql.operation.type` MUST be one of the following:

| Value | Description |
|---|---|
| `query` | GraphQL query |
| `mutation` | GraphQL mutation |
| `subscription` | GraphQL subscription |
<!-- endsemconv -->

0 comments on commit c28b5ab

Please sign in to comment.