Semantic Conventions for Event Attributes

Status: Experimental

This document describes the attributes of standalone Events that are represented in the data model by LogRecords.

The following semantic conventions for events are defined:

  • General: General semantic attributes that may be used in describing Events.
  • Exceptions: Semantic attributes that may be used in describing exceptions as events.

General event attributes

Events are recorded as LogRecords that are shaped in a special way: Event LogRecords have the attribute event.name that uniquely identifies the event. Events with same event.name are structurally similar to one another. Events may also have other LogRecord attributes.

When recording events from an existing system as OpenTelemetry Events, it is possible that the existing system does not have the equivalent of a name or requires multiple fields to identify the structure of the events. In such cases, OpenTelemetry recommends using a combination of one or more fields as the name such that the name identifies the event structurally. It is also recommended that the event names have low-cardinality, so care must be taken to use fields that identify the class of Events but not the instance of the Event.

AttributeTypeDescriptionExamplesRequirement Level
event.namestringIdentifies the class / type of event. [1]browser.mouse.click; device.app.lifecycleRequired

[1]: Event names are subject to the same rules as attribute names. Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes.