Skip to content

Commit 768a23c

Browse files
authoredApr 10, 2024··
[chore] Move otel.* attributes to registry (#891)
1 parent 51813f6 commit 768a23c

File tree

3 files changed

+47
-22
lines changed

3 files changed

+47
-22
lines changed
 

‎docs/attributes-registry/otel.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,29 @@
55

66
<!-- toc -->
77

8-
- [OpenTelemetry Attributes](#opentelemetry-attributes)
8+
- [General Attributes](#general-attributes)
9+
- [Scope Attributes](#scope-attributes)
910
- [Deprecated OpenTelemetry Attributes](#deprecated-opentelemetry-attributes)
1011

1112
<!-- tocstop -->
1213

13-
## OpenTelemetry Attributes
14+
## General Attributes
15+
16+
<!-- semconv registry.otel(omit_requirement_level) -->
17+
| Attribute | Type | Description | Examples | Stability |
18+
|---|---|---|---|---|
19+
| `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) |
20+
| `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) |
21+
22+
`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.
23+
24+
| Value | Description | Stability |
25+
|---|---|---|
26+
| `OK` | The operation has been validated by an Application developer or Operator to have completed successfully. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
27+
| `ERROR` | The operation contains an error. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
28+
<!-- endsemconv -->
29+
30+
## Scope Attributes
1431

1532
<!-- semconv registry.otel.scope(omit_requirement_level) -->
1633
| Attribute | Type | Description | Examples | Stability |

‎model/registry/otel.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
groups:
2+
- id: registry.otel
3+
prefix: otel
4+
type: attribute_group
5+
brief: Attributes reserved for OpenTelemetry
6+
attributes:
7+
- id: status_code
8+
type:
9+
allow_custom_values: true
10+
members:
11+
- id: ok
12+
value: OK
13+
brief: 'The operation has been validated by an Application developer or Operator to have completed successfully.'
14+
stability: stable
15+
- id: error
16+
value: ERROR
17+
brief: 'The operation contains an error.'
18+
stability: stable
19+
brief: Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
20+
stability: stable
21+
- id: status_description
22+
type: string
23+
brief: "Description of the Status if it has a value, otherwise not set."
24+
examples: ['resource not found']
25+
stability: stable
226
- id: registry.otel.scope
327
prefix: otel.scope
428
type: resource

‎model/trace/exporter/exporter.yaml

+4-20
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
groups:
22
- id: otel_span
3-
prefix: otel
43
type: span
54
brief: Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's concepts.
65
attributes:
7-
- id: status_code
8-
type:
9-
allow_custom_values: false
10-
members:
11-
- id: ok
12-
value: OK
13-
brief: 'The operation has been validated by an Application developer or Operator to have completed successfully.'
14-
stability: experimental
15-
- id: error
16-
value: ERROR
17-
brief: 'The operation contains an error.'
18-
stability: experimental
19-
brief: Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
20-
stability: stable
21-
- id: status_description
22-
type: string
23-
brief: "Description of the Status if it has a value, otherwise not set."
24-
examples: ['resource not found']
25-
stability: stable
6+
- ref: otel.status_code
7+
requirement_level: recommended
8+
- ref: otel.status_description
9+
requirement_level: recommended

0 commit comments

Comments
 (0)
Please sign in to comment.