[chore] move graphql to registry (#882)

This commit is contained in:
Alexandra Konrad 2024-04-05 08:53:02 +02:00 committed by GitHub
parent 1210132a1b
commit 98bed07b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 74 additions and 35 deletions

View File

@ -41,6 +41,7 @@ body:
- area:file - area:file
- area:gcp-cloud-run - area:gcp-cloud-run
- area:gcp-gce - area:gcp-gce
- area:graphql
- area:host - area:host
- area:http - area:http
- area:k8s - area:k8s

View File

@ -34,6 +34,7 @@ body:
- area:file - area:file
- area:gcp-cloud-run - area:gcp-cloud-run
- area:gcp-gce - area:gcp-gce
- area:graphql
- area:host - area:host
- area:http - area:http
- area:k8s - area:k8s

View File

@ -43,6 +43,7 @@ body:
- area:file - area:file
- area:gcp-cloud-run - area:gcp-cloud-run
- area:gcp-gce - area:gcp-gce
- area:graphql
- area:host - area:host
- area:http - area:http
- area:k8s - area:k8s

View File

@ -48,6 +48,7 @@ Currently, the following namespaces exist:
* [File](file.md) * [File](file.md)
* [Google Cloud Run](gcp-cloud-run.md) * [Google Cloud Run](gcp-cloud-run.md)
* [Google Compute Engine](gcp-gce.md) * [Google Compute Engine](gcp-gce.md)
* [GraphQl](graphql.md)
* [Host](host.md) * [Host](host.md)
* [HTTP](http.md) * [HTTP](http.md)
* [K8s](k8s.md) * [K8s](k8s.md)

View File

@ -0,0 +1,24 @@
<!--- Hugo front matter used to generate the website version of this page:
--->
# GraphQL
## GraphQL Attributes
<!-- semconv registry.graphql(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `graphql.document` | string | The GraphQL document being executed. [1] | `query findBookById { bookById(id: ?) { name } }` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `graphql.operation.name` | string | The name of the operation being executed. | `findBookById` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `graphql.operation.type` | string | The type of the operation being executed. | `query`; `mutation`; `subscription` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
**[1]:** The value may be sanitized to exclude sensitive information.
`graphql.operation.type` MUST be one of the following:
| Value | Description | Stability |
|---|---|---|
| `query` | GraphQL query | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `mutation` | GraphQL mutation | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `subscription` | GraphQL subscription | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

View File

@ -14,12 +14,12 @@ The **span name** MUST be of the format `<graphql.operation.type> <graphql.opera
span SHOULD be named `<graphql.operation.type>`. When `<graphql.operation.type>` is not available, `GraphQL Operation` span SHOULD be named `<graphql.operation.type>`. When `<graphql.operation.type>` is not available, `GraphQL Operation`
MAY be used as span name. MAY be used as span name.
<!-- semconv graphql --> <!-- semconv graphql(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---| |---|---|---|---|---|---|
| `graphql.document` | string | The GraphQL document being executed. [1] | `query findBookById { bookById(id: ?) { name } }` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`graphql.document`](../attributes-registry/graphql.md) | string | The GraphQL document being executed. [1] | `query findBookById { bookById(id: ?) { name } }` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `graphql.operation.name` | string | The name of the operation being executed. | `findBookById` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`graphql.operation.name`](../attributes-registry/graphql.md) | string | The name of the operation being executed. | `findBookById` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `graphql.operation.type` | string | The type of the operation being executed. | `query`; `mutation`; `subscription` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`graphql.operation.type`](../attributes-registry/graphql.md) | string | The type of the operation being executed. | `query`; `mutation`; `subscription` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
**[1]:** The value may be sanitized to exclude sensitive information. **[1]:** The value may be sanitized to exclude sensitive information.

View File

@ -0,0 +1,36 @@
groups:
- id: registry.graphql
prefix: graphql
type: attribute_group
brief: 'This document defines attributes for GraphQL.'
attributes:
- id: operation.name
brief: "The name of the operation being executed."
type: string
stability: experimental
examples: 'findBookById'
- id: operation.type
brief: "The type of the operation being executed."
stability: experimental
type:
allow_custom_values: false
members:
- id: query
value: "query"
brief: "GraphQL query"
stability: experimental
- id: mutation
value: "mutation"
brief: "GraphQL mutation"
stability: experimental
- id: subscription
value: "subscription"
brief: "GraphQL subscription"
stability: experimental
examples: ['query', 'mutation', 'subscription']
- id: document
brief: "The GraphQL document being executed."
type: string
stability: experimental
note: The value may be sanitized to exclude sensitive information.
examples: 'query findBookById { bookById(id: ?) { name } }'

View File

@ -1,38 +1,13 @@
groups: groups:
- id: graphql - id: graphql
prefix: graphql
type: span type: span
brief: > brief: >
This document defines semantic conventions to apply when instrumenting the GraphQL implementation. They map This document defines semantic conventions to apply when instrumenting the GraphQL implementation. They map
GraphQL operations to attributes on a Span. GraphQL operations to attributes on a Span.
attributes: attributes:
- id: operation.name - ref: graphql.operation.name
brief: "The name of the operation being executed." requirement_level: recommended
type: string - ref: graphql.operation.type
stability: experimental requirement_level: recommended
examples: 'findBookById' - ref: graphql.document
- id: operation.type requirement_level: recommended
brief: "The type of the operation being executed."
stability: experimental
type:
allow_custom_values: false
members:
- id: query
value: "query"
brief: "GraphQL query"
stability: experimental
- id: mutation
value: "mutation"
brief: "GraphQL mutation"
stability: experimental
- id: subscription
value: "subscription"
brief: "GraphQL subscription"
stability: experimental
examples: ['query', 'mutation', 'subscription']
- id: document
brief: "The GraphQL document being executed."
type: string
stability: experimental
note: The value may be sanitized to exclude sensitive information.
examples: 'query findBookById { bookById(id: ?) { name } }'