Revive `event.name` attribute (#2715)

Co-authored-by: Liudmila Molkova <neskazu@gmail.com>
This commit is contained in:
Robert Pająk 2025-09-08 16:57:58 +02:00 committed by GitHub
parent 33c54e59aa
commit ba43fe4760
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 33 additions and 18 deletions

8
.chloggen/2597.yaml Normal file
View File

@ -0,0 +1,8 @@
change_type: enhancement
component: event
note: "Revive `event.name` attribute for use by non-OTLP exporters and logging libraries."
issues: [2597]
subtext: |
The `event.name` attribute is now undeprecated and can be used by:
- Non-OTLP exporters to emit the `EventName`
- Applications using existing logging libraries to add event name information that can be used to set the `EventName` field by Collector or SDK components

View File

@ -49,6 +49,7 @@ body:
- area:elasticsearch
- area:enduser
- area:error
- area:event
- area:exception
- area:faas
- area:feature-flag

View File

@ -41,6 +41,7 @@ body:
- area:elasticsearch
- area:enduser
- area:error
- area:event
- area:exception
- area:faas
- area:feature-flag

View File

@ -52,6 +52,7 @@ body:
- area:elasticsearch
- area:enduser
- area:error
- area:event
- area:exception
- area:faas
- area:feature-flag

View File

@ -9,4 +9,6 @@ Attributes for Events represented using Log Records.
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| <a id="event-name" href="#event-name">`event.name`</a> | string | Identifies the class / type of event. | `browser.mouse.click`; `device.app.lifecycle` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by EventName top-level field on the LogRecord. |
| <a id="event-name" href="#event-name">`event.name`</a> | string | Identifies the class / type of event. [1] | `browser.mouse.click`; `device.app.lifecycle` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `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.

View File

@ -1,17 +0,0 @@
groups:
- id: registry.event.deprecated
type: attribute_group
display_name: Event Attributes
brief: >
Attributes for Events represented using Log Records.
attributes:
- id: event.name
type: string
stability: development
deprecated:
reason: uncategorized
note: >
Replaced by EventName top-level field on the LogRecord.
brief: >
Identifies the class / type of event.
examples: ["browser.mouse.click", "device.app.lifecycle"]

19
model/event/registry.yaml Normal file
View File

@ -0,0 +1,19 @@
groups:
- id: registry.event
type: attribute_group
display_name: Event Attributes
brief: >
Attributes for Events represented using Log Records.
attributes:
- id: event.name
type: string
stability: development
brief: >
Identifies the class / type of event.
note: >
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.
examples: ["browser.mouse.click", "device.app.lifecycle"]