Skip to content

Commit

Permalink
Deprecate �vent.name attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Dec 3, 2024
1 parent 41053b5 commit adf6a98
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 51 deletions.
4 changes: 1 addition & 3 deletions docs/attributes-registry/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ 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. [1] | `browser.mouse.click`; `device.app.lifecycle` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1] `event.name`:** Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). 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.
| <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 |
2 changes: 1 addition & 1 deletion docs/azure/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Resource Log events.

**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue)

The event name MUST be `az.resource.log`.
The [EventName](TODO link to new spec model) MUST be `az.resource.log`.

Describes Azure Resource Log event, see [Azure Resource Log Top-level Schema](https://learn.microsoft.com/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema) for more details.

Expand Down
2 changes: 1 addition & 1 deletion docs/exceptions/exceptions-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ try {

**Status:** ![Stable](https://img.shields.io/badge/-stable-lightgreen)

The event name MUST be `exception`.
The [EventName](TODO link to new spec model) MUST be `exception`.

This event describes a single exception.

Expand Down
2 changes: 1 addition & 1 deletion docs/feature-flags/feature-flags-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The table below indicates which attributes should be added to the

**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue)

The event name MUST be `feature_flag.evaluation`.
The [EventName](TODO link to new spec model) MUST be `feature_flag.evaluation`.

Defines feature flag evaluation as an event.

Expand Down
28 changes: 4 additions & 24 deletions docs/general/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,9 @@ field semantics, and stability and requirement levels. Other events may be user-
bespoke user semantics. When an Event name exists in the semantic conventions, its _payload_
structure and semantics will also be defined.

## Event definition
## General event semantics

<!-- semconv event -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`event.name`](/docs/attributes-registry/event.md) | string | Identifies the class / type of event. [1] | `browser.mouse.click`; `device.app.lifecycle` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1] `event.name`:** Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). 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.

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### General event semantics

* An event MUST have an `event.name` attribute that uniquely identifies the event.
* An event MUST have an [Event name property](TODO link to new spec model) that uniquely identifies the event.
* It MAY have [standard](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.39.0/specification/common#attribute)
attributes that provide additional context about the event.
* It MAY contain a _payload_ (body) that describes the specific details of the
Expand Down Expand Up @@ -87,15 +67,15 @@ Recommendations on using attributes vs. body fields:

* If the field should be comparable across every type of record, it should be an attribute.
* If the field is specific to the event itself, then it should be a body field.
* Unless the same `event.name` exists on two events, anything in two event bodies is not comparable to each other.
* Unless two events share the same `EventName` property value, anything in two event bodies is not comparable to each other.

### Event payload (body)

* Common attribute naming conventions and [registry](../attributes-registry/README.md)
requirements don't apply to event payload fields.
* The definition for OpenTelemetry defined events supports describing
individual _fields_ (Body Fields)
* The _fields_ are unique to the named event (`event.name`) and different events
* The _fields_ are unique to the named event ([EventName](TODO link to new spec model)) and different events
may use the same _field_ name to represent different data, due to the unique
nature of the event.

Expand Down
4 changes: 2 additions & 2 deletions docs/general/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ backends can link the two sessions (see [Session Start Event](#session-start-eve

![Experimental](https://img.shields.io/badge/-experimental-blue)

`event.name` MUST be`session.start`
[EventName](TODO link to new spec model) MUST be`session.start`

For instrumentation that tracks user behavior during user sessions, a `session.start` event MUST be emitted
every time a session is created. When a new session is created as a continuation of a prior session,
Expand All @@ -61,7 +61,7 @@ that the previous session has ended. If the session ID in `session.previous_id`

![Experimental](https://img.shields.io/badge/-experimental-blue)

`event.name` MUST be `session.end`
[EventName](TODO link to new spec model) MUST be `session.end`

For instrumentation that tracks user behavior during user sessions, a `session.end` event SHOULD be emitted
every time a session ends. When a session ends and continues as a new session, this event SHOULD be
Expand Down
4 changes: 2 additions & 2 deletions docs/mobile/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This document defines semantic conventions for instrumentations that emit
events on mobile platforms. All mobile events MUST use a namespace of
`device` in the `event.name` property.
`device` in the EventName LogRecord property.

<!-- toc -->

Expand All @@ -29,7 +29,7 @@ application lifecycle.

**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue)

The event name MUST be `device.app.lifecycle`.
The [EventName](TODO link to new spec model) MUST be `device.app.lifecycle`.

This event represents an occurrence of a lifecycle transition on Android or iOS platform.

Expand Down
2 changes: 1 addition & 1 deletion docs/rpc/rpc-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345.

**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue)

The event name MUST be `rpc.message`.
The [EventName](TODO link to new spec model) MUST be `rpc.message`.

Describes a message sent or received within the context of an RPC call.

Expand Down
9 changes: 0 additions & 9 deletions model/event/common.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
groups:
- id: registry.event
- id: registry.event.deprecated
type: attribute_group
display_name: Event Attributes
brief: >
Expand All @@ -8,11 +8,7 @@ groups:
- id: event.name
type: string
stability: experimental
deprecated: "Replaced by EventName top-level field on the LogRecord"
brief: >
Identifies the class / type of event.
note: >
Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md).
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.
examples: ["browser.mouse.click", "device.app.lifecycle"]
2 changes: 1 addition & 1 deletion templates/registry/markdown/event_macros.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% import 'body_field_table.j2' as body_table %}
{% macro header(event) %}**Status:** {{ stability.badge(event.stability, event.deprecated) }}

The event name MUST be `{{ event.name }}`.
The [EventName](TODO link to new spec model) MUST be `{{ event.name }}`.

{{ event.brief | trim }}
{%if event.note %}
Expand Down

0 comments on commit adf6a98

Please sign in to comment.