[chore] Move otel.* attributes to registry (#891)

This commit is contained in:
Joao Grassi 2024-04-10 09:57:09 +02:00 committed by GitHub
parent 51813f68ca
commit 768a23c362
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 47 additions and 22 deletions

View File

@ -5,12 +5,29 @@
<!-- toc --> <!-- toc -->
- [OpenTelemetry Attributes](#opentelemetry-attributes) - [General Attributes](#general-attributes)
- [Scope Attributes](#scope-attributes)
- [Deprecated OpenTelemetry Attributes](#deprecated-opentelemetry-attributes) - [Deprecated OpenTelemetry Attributes](#deprecated-opentelemetry-attributes)
<!-- tocstop --> <!-- tocstop -->
## OpenTelemetry Attributes ## General Attributes
<!-- semconv registry.otel(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `otel.status_code` | string | Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. | `OK` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `otel.status_description` | string | Description of the Status if it has a value, otherwise not set. | `resource not found` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
`otel.status_code` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
| `OK` | The operation has been validated by an Application developer or Operator to have completed successfully. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `ERROR` | The operation contains an error. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
<!-- endsemconv -->
## Scope Attributes
<!-- semconv registry.otel.scope(omit_requirement_level) --> <!-- semconv registry.otel.scope(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability | | Attribute | Type | Description | Examples | Stability |

View File

@ -1,4 +1,28 @@
groups: groups:
- id: registry.otel
prefix: otel
type: attribute_group
brief: Attributes reserved for OpenTelemetry
attributes:
- id: status_code
type:
allow_custom_values: true
members:
- id: ok
value: OK
brief: 'The operation has been validated by an Application developer or Operator to have completed successfully.'
stability: stable
- id: error
value: ERROR
brief: 'The operation contains an error.'
stability: stable
brief: Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
stability: stable
- id: status_description
type: string
brief: "Description of the Status if it has a value, otherwise not set."
examples: ['resource not found']
stability: stable
- id: registry.otel.scope - id: registry.otel.scope
prefix: otel.scope prefix: otel.scope
type: resource type: resource

View File

@ -1,25 +1,9 @@
groups: groups:
- id: otel_span - id: otel_span
prefix: otel
type: span type: span
brief: Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's concepts. brief: Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's concepts.
attributes: attributes:
- id: status_code - ref: otel.status_code
type: requirement_level: recommended
allow_custom_values: false - ref: otel.status_description
members: requirement_level: recommended
- id: ok
value: OK
brief: 'The operation has been validated by an Application developer or Operator to have completed successfully.'
stability: experimental
- id: error
value: ERROR
brief: 'The operation contains an error.'
stability: experimental
brief: Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
stability: stable
- id: status_description
type: string
brief: "Description of the Status if it has a value, otherwise not set."
examples: ['resource not found']
stability: stable