diff --git a/CHANGELOG.md b/CHANGELOG.md index 08ce1ef2a1b..852e94c7700 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ release. ([#4310](https://github.com/open-telemetry/opentelemetry-specification/pull/4310)) - Remove the in-development isolating log record processor. ([#4301](https://github.com/open-telemetry/opentelemetry-specification/pull/4301)) +- Change `event.name` attribute into top-level event name field. + ([#4320](https://github.com/open-telemetry/opentelemetry-specification/pull/4320)) ### Events diff --git a/specification/logs/api.md b/specification/logs/api.md index aa7638351a6..f04062c1348 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -137,6 +137,7 @@ The API MUST accept the following parameters: - [Severity Text](./data-model.md#field-severitytext) (optional) - [Body](./data-model.md#field-body) (optional) - [Attributes](./data-model.md#field-attributes) (optional) +- **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#event-name) (optional) #### Enabled @@ -173,8 +174,7 @@ formatted as an [event](./data-model.md#events). **Parameters:** -* The [`Name`](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md) - of the Event. +* [Event Name](./data-model.md#event-name) (required) * [Timestamp](./data-model.md#field-timestamp) (optional) * [Observed Timestamp](./data-model.md#field-observedtimestamp) (optional). If unspecified the implementation SHOULD set it equal to the current time. diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index c7e88dd745b..3fed63c0ba4 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -1,6 +1,6 @@ # Logs Data Model -**Status**: [Stable](../document-status.md) +**Status**: [Stable](../document-status.md), except where otherwise specified
Table of Contents @@ -34,6 +34,7 @@ * [Field: `InstrumentationScope`](#field-instrumentationscope) * [Field: `Attributes`](#field-attributes) + [Errors and Exceptions](#errors-and-exceptions) + * [Field: `EventName`](#field-eventname) - [Example Log Records](#example-log-records) - [Example Mappings](#example-mappings) - [References](#references) @@ -208,6 +209,7 @@ Body |The body of the log record. Resource |Describes the source of the log. InstrumentationScope|Describes the scope that emitted the log. Attributes |Additional information about the event. +**Status**: [Development](../document-status.md) - EventName | Name that identifies the class / type of event. Below is the detailed description of each field. @@ -477,6 +479,16 @@ of the record. If included, they MUST follow the OpenTelemetry [semantic conventions for exception-related attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/exceptions/exceptions-logs.md). +### Field: `EventName` + +**Status**: [Development](../document-status.md) + +Type: string. + +Description: Name that identifies the class / type of the [Event](#events). +This name SHOULD uniquely identify the event structure (both attributes and body). +A log record with a non-empty event name is an [Event](#events). + ## Example Log Records For example log records see diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 1de732275fd..930d900c3f4 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -232,6 +232,7 @@ the following information added to the [LogRecord](data-model.md#log-and-event-r * [`TraceId`](./data-model.md#field-traceid) * [`SpanId`](./data-model.md#field-spanid) * [`TraceFlags`](./data-model.md#field-traceflags) +* **Status**: [Development](../document-status.md) - [`EventName`](./data-model.md#event-name) The SDK MAY provide an operation that makes a deep clone of a `ReadWriteLogRecord`. The operation can be used by asynchronous processors (e.g. [Batching processor](#batching-processor)) diff --git a/specification/versioning-and-stability.md b/specification/versioning-and-stability.md index 22f9f8e96b0..a9a9ce9c9d4 100644 --- a/specification/versioning-and-stability.md +++ b/specification/versioning-and-stability.md @@ -247,7 +247,7 @@ Semantic Conventions defines the set of fields in the OTLP data model: - The attribute keys provided on the LogRecord - The attribute values provided on the LogRecord that are defined in a list of well-known values. - - The event name (the value of the `event.name` attribute) + - The event name Things not listed in the above are not expected to remain stable via semantic convention and are allowed (or expected) to change. A few examples: