Skip to content

Commit 7fddc86

Browse files
authored
[otel] add otel.event.name attribute (#3034)
1 parent a85e13b commit 7fddc86

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.chloggen/2913.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
change_type: enhancement
2+
component: otel
3+
note: "Add `otel.event.name` attribute for use by non-OTLP exporters and logging libraries."
4+
issues: [2913]
5+
subtext: |
6+
The `otel.event.name` attribute can be used by:
7+
- Non-OTLP exporters to emit the `EventName`
8+
- Applications using existing logging libraries to add event name information that can be used to set the `EventName` field by Collector or SDK components

docs/registry/attributes/otel.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
- [OTel Attributes](#otel-attributes)
77
- [OTel Component Attributes](#otel-component-attributes)
8+
- [OTel Event Attributes](#otel-event-attributes)
89
- [OTel Scope Attributes](#otel-scope-attributes)
910
- [Deprecated OTel Library Attributes](#deprecated-otel-library-attributes)
1011

@@ -101,6 +102,18 @@ E.g. for Java the fully qualified classname SHOULD be used in this case.
101102
| `simple_span_processor` | The builtin SDK simple span processor | ![Development](https://img.shields.io/badge/-development-blue) |
102103
| `zipkin_http_span_exporter` | Zipkin span exporter over HTTP | ![Development](https://img.shields.io/badge/-development-blue) |
103104

105+
## OTel Event Attributes
106+
107+
Attributes used by non-OTLP exporters to represent OpenTelemetry Event's concepts.
108+
109+
**Attributes:**
110+
111+
| Key | Stability | Value Type | Description | Example Values |
112+
|---|---|---|---|---|
113+
| <a id="otel-event-name" href="#otel-event-name">`otel.event.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Identifies the class / type of event. [3] | `browser.mouse.click`; `device.app.lifecycle` |
114+
115+
**[3] `otel.event.name`:** This attribute SHOULD be used by non-OTLP exporters when destination does not support `EventName` or equivalent field. This attribute MAY be used by applications using existing logging libraries so that it can be used to set the `EventName` field by Collector or SDK components.
116+
104117
## OTel Scope Attributes
105118

106119
Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts.

model/otel/registry.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ groups:
7676
brief: The schema URL of the instrumentation scope.
7777
examples: ['https://opentelemetry.io/schemas/1.31.0']
7878
stability: development
79+
- id: registry.otel.event
80+
type: attribute_group
81+
display_name: OTel Event Attributes
82+
brief: Attributes used by non-OTLP exporters to represent OpenTelemetry Event's concepts.
83+
attributes:
84+
- id: otel.event.name
85+
type: string
86+
stability: development
87+
brief: >
88+
Identifies the class / type of event.
89+
note: >
90+
This attribute SHOULD be used by non-OTLP exporters
91+
when destination does not support `EventName` or equivalent field.
92+
This attribute MAY be used by applications using existing logging
93+
libraries so that it can be used to set the `EventName` field by
94+
Collector or SDK components.
95+
examples: ["browser.mouse.click", "device.app.lifecycle"]
7996
- id: registry.otel.component
8097
type: attribute_group
8198
display_name: OTel Component Attributes

0 commit comments

Comments
 (0)