Skip to content

Commit

Permalink
Change event.name attribute into top-level event name field
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Dec 4, 2024
1 parent 50027a1 commit e994c1b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 1 addition & 2 deletions specification/logs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,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.
Expand Down
9 changes: 9 additions & 0 deletions specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
+ [Type `map`](#type-mapstring-any)
* [Field Kinds](#field-kinds)
- [Log and Event Record Definition](#log-and-event-record-definition)
* [Field: `EventName`](#field-eventname)
* [Field: `Timestamp`](#field-timestamp)
* [Field: `ObservedTimestamp`](#field-observedtimestamp)
* [Trace Context Fields](#trace-context-fields)
Expand Down Expand Up @@ -197,6 +198,7 @@ Here is the list of fields in a log record:

Field Name |Description
---------------|--------------------------------------------
EventName |Name that identifies the class / type of event.
Timestamp |Time when the event occurred.
ObservedTimestamp|Time when the event was observed.
TraceId |Request trace id.
Expand All @@ -211,6 +213,13 @@ Attributes |Additional information about the event.

Below is the detailed description of each field.

### Field: `EventName`

Type: string.

Description: Name that identifies the class / type of event.
This name SHOULD uniquely identify the event structure (both attributes and body).

### Field: `Timestamp`

Type: Timestamp, uint64 nanoseconds since Unix epoch.
Expand Down
2 changes: 1 addition & 1 deletion specification/versioning-and-stability.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Semantic Conventions defines the set of fields in the OTLP data model:
of well-known values.
- For log records that are [Log Events](logs/event-api.md)
- The following data provided to [emit event](logs/event-api.md#emit-event):
- 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:
Expand Down

0 comments on commit e994c1b

Please sign in to comment.