Skip to content

Commit a265ae0

Browse files
authored
Change event.name attribute into top-level event name field (#4320)
1 parent 52e9be7 commit a265ae0

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ release.
3434
([#4310](https://github.com/open-telemetry/opentelemetry-specification/pull/4310))
3535
- Remove the in-development isolating log record processor.
3636
([#4301](https://github.com/open-telemetry/opentelemetry-specification/pull/4301))
37+
- Change `event.name` attribute into top-level event name field.
38+
([#4320](https://github.com/open-telemetry/opentelemetry-specification/pull/4320))
3739

3840
### Events
3941

specification/logs/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ The API MUST accept the following parameters:
137137
- [Severity Text](./data-model.md#field-severitytext) (optional)
138138
- [Body](./data-model.md#field-body) (optional)
139139
- [Attributes](./data-model.md#field-attributes) (optional)
140+
- **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#event-name) (optional)
140141

141142
#### Enabled
142143

@@ -173,8 +174,7 @@ formatted as an [event](./data-model.md#events).
173174

174175
**Parameters:**
175176

176-
* The [`Name`](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md)
177-
of the Event.
177+
* [Event Name](./data-model.md#event-name) (required)
178178
* [Timestamp](./data-model.md#field-timestamp) (optional)
179179
* [Observed Timestamp](./data-model.md#field-observedtimestamp) (optional). If unspecified
180180
the implementation SHOULD set it equal to the current time.

specification/logs/data-model.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Logs Data Model
22

3-
**Status**: [Stable](../document-status.md)
3+
**Status**: [Stable](../document-status.md), except where otherwise specified
44

55
<details>
66
<summary>Table of Contents</summary>
@@ -34,6 +34,7 @@
3434
* [Field: `InstrumentationScope`](#field-instrumentationscope)
3535
* [Field: `Attributes`](#field-attributes)
3636
+ [Errors and Exceptions](#errors-and-exceptions)
37+
* [Field: `EventName`](#field-eventname)
3738
- [Example Log Records](#example-log-records)
3839
- [Example Mappings](#example-mappings)
3940
- [References](#references)
@@ -208,6 +209,7 @@ Body |The body of the log record.
208209
Resource |Describes the source of the log.
209210
InstrumentationScope|Describes the scope that emitted the log.
210211
Attributes |Additional information about the event.
212+
**Status**: [Development](../document-status.md) - EventName | Name that identifies the class / type of event.
211213

212214
Below is the detailed description of each field.
213215

@@ -477,6 +479,16 @@ of the record.
477479
If included, they MUST follow the OpenTelemetry
478480
[semantic conventions for exception-related attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/exceptions/exceptions-logs.md).
479481

482+
### Field: `EventName`
483+
484+
**Status**: [Development](../document-status.md)
485+
486+
Type: string.
487+
488+
Description: Name that identifies the class / type of the [Event](#events).
489+
This name SHOULD uniquely identify the event structure (both attributes and body).
490+
A log record with a non-empty event name is an [Event](#events).
491+
480492
## Example Log Records
481493

482494
For example log records see

specification/logs/sdk.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ the following information added to the [LogRecord](data-model.md#log-and-event-r
232232
* [`TraceId`](./data-model.md#field-traceid)
233233
* [`SpanId`](./data-model.md#field-spanid)
234234
* [`TraceFlags`](./data-model.md#field-traceflags)
235+
* **Status**: [Development](../document-status.md) - [`EventName`](./data-model.md#event-name)
235236

236237
The SDK MAY provide an operation that makes a deep clone of a `ReadWriteLogRecord`.
237238
The operation can be used by asynchronous processors (e.g. [Batching processor](#batching-processor))

specification/versioning-and-stability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Semantic Conventions defines the set of fields in the OTLP data model:
247247
- The attribute keys provided on the LogRecord
248248
- The attribute values provided on the LogRecord that are defined in a list
249249
of well-known values.
250-
- The event name (the value of the `event.name` attribute)
250+
- The event name
251251

252252
Things not listed in the above are not expected to remain stable via semantic
253253
convention and are allowed (or expected) to change. A few examples:

0 commit comments

Comments
 (0)