diff --git a/docs/attributes-registry/otel.md b/docs/attributes-registry/otel.md index 92c94105c..a064129e9 100644 --- a/docs/attributes-registry/otel.md +++ b/docs/attributes-registry/otel.md @@ -5,12 +5,29 @@ -- [OpenTelemetry Attributes](#opentelemetry-attributes) +- [General Attributes](#general-attributes) +- [Scope Attributes](#scope-attributes) - [Deprecated OpenTelemetry Attributes](#deprecated-opentelemetry-attributes) -## OpenTelemetry Attributes +## General Attributes + + +| 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) | + + +## Scope Attributes | Attribute | Type | Description | Examples | Stability | diff --git a/model/registry/otel.yaml b/model/registry/otel.yaml index 1fa7f0da4..7da6ece28 100644 --- a/model/registry/otel.yaml +++ b/model/registry/otel.yaml @@ -1,4 +1,28 @@ 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 prefix: otel.scope type: resource diff --git a/model/trace/exporter/exporter.yaml b/model/trace/exporter/exporter.yaml index 124c5da19..0c4e8c6a8 100644 --- a/model/trace/exporter/exporter.yaml +++ b/model/trace/exporter/exporter.yaml @@ -1,25 +1,9 @@ groups: - id: otel_span - prefix: otel type: span brief: Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's concepts. attributes: - - id: status_code - type: - allow_custom_values: false - members: - - 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 + - ref: otel.status_code + requirement_level: recommended + - ref: otel.status_description + requirement_level: recommended