You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <aid="event-name"href="#event-name">`event.name`</a> | string | Identifies the class / type of event. [1]|`browser.mouse.click`; `device.app.lifecycle`||
16
-
17
-
**[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.
15
+
| <aid="event-name"href="#event-name">`event.name`</a> | string | Identifies the class / type of event. |`browser.mouse.click`; `device.app.lifecycle`|<br>Replaced by EventName top-level field on the LogRecord |
Copy file name to clipboardExpand all lines: docs/gen-ai/gen-ai-events.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,10 +23,15 @@ linkTitle: Generative AI events
23
23
24
24
<!-- tocstop -->
25
25
26
-
GenAI instrumentations MAY capture user inputs sent to the model and responses received from it as [events](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.39.0/specification/logs/event-api.md).
26
+
GenAI instrumentations MAY capture user inputs sent to the model and responses received from it as [events](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/specification/logs/api.md#emit-an-event).
27
27
28
+
<<<<<<< HEAD
28
29
> [!NOTE]
29
30
> Event API is experimental and not yet available in some languages. Check [spec-compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md#events) to see the implementation status in corresponding language.
31
+
=======
32
+
> Note:
33
+
> Event API is experimental and not yet available in some languages. Check [spec-compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/spec-compliance-matrix.md#logs) to see the implementation status in corresponding language.
34
+
>>>>>>> 75746bc9 (reword)
30
35
31
36
Instrumentations MAY capture inputs and outputs if and only if application has enabled the collection of this data.
Copy file name to clipboardExpand all lines: docs/general/events.md
+15-37Lines changed: 15 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ aliases: [events-general]
5
5
6
6
# Semantic Conventions for Events
7
7
8
-
**Status**: [Experimental][DocumentStatus]
8
+
**Status**: [Development][DocumentStatus]
9
9
10
10
This document describes the characteristics of standalone Events that are represented
11
11
in the data model by `LogRecord`s.
@@ -15,11 +15,7 @@ Semantically, an Event is a named occurrence at an instant in time. It signals t
15
15
Examples of Events might include things like uncaught exceptions, button clicks, user logout,
16
16
network connection severed, etc.
17
17
18
-
In OpenTelemetry, Events are implemented as a specific type of `LogRecord` that conforms to
19
-
the conventions included here, and Events
20
-
[have their own API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md).
21
-
The API abstracts away knowledge of `LogRecord` so that users only deal with Event
22
-
semantics.
18
+
In OpenTelemetry, Events are implemented as a specific type of [`LogRecord`](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.39.0/specification/logs/api.md) that conforms to the conventions included here.
23
19
24
20
In addition to a required name, an Event may contain a _payload_ (body) of any type permitted
25
21
by the [LogRecord body](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-body).
@@ -32,30 +28,11 @@ field semantics, and stability and requirement levels. Other events may be user-
32
28
bespoke user semantics. When an Event name exists in the semantic conventions, its _payload_
33
29
structure and semantics will also be defined.
34
30
35
-
## Event definition
31
+
## General event semantics
36
32
37
-
<!-- semconv event -->
38
-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
39
-
<!-- see templates/registry/markdown/snippet.md.j2 -->
|[`event.name`](/docs/attributes-registry/event.md)| string | Identifies the class / type of event. [1]|`browser.mouse.click`; `device.app.lifecycle`|`Required`||
47
-
48
-
**[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.
49
-
50
-
<!-- markdownlint-restore -->
51
-
<!-- prettier-ignore-end -->
52
-
<!-- END AUTOGENERATED TEXT -->
53
-
<!-- endsemconv -->
54
-
55
-
### General event semantics
56
-
57
-
* An event MUST have an `event.name` attribute that uniquely identifies the event.
58
-
* It MAY have [standard](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.39.0/specification/common#attribute)
33
+
* An event MUST have an [Event name property](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.40.0/specification/logs/data-model.md#field-eventname)
34
+
that uniquely identifies the event. Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md).
35
+
* Event MAY have [standard](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.39.0/specification/common#attribute)
59
36
attributes that provide additional context about the event.
60
37
* It MAY contain a _payload_ (body) that describes the specific details of the
61
38
named event.
@@ -73,29 +50,30 @@ Recommendations for defining events:
73
50
collection of [standard](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.39.0/specification/common#attribute)
74
51
attributes.
75
52
* Events SHOULD be generated / produced / recorded using the
to ensure that the event is created using the configured SDK instance.
78
-
* The Event API is not yet available in all OpenTelemetry SDKs.
79
-
* TODO: Add deep link to the [compliance matrix of the Event API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md)
80
-
when it exists.
81
-
* It's NOT RECOMMENDED to prefix the _payload_ (body) _fields_ with the `event.name` to
55
+
* The Emit Event API is not yet available in all OpenTelemetry SDKs. Check [spec-compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/spec-compliance-matrix.md#logs) to see the implementation status in corresponding language.
56
+
* It's NOT RECOMMENDED to prefix the _payload_ (body) _fields_ with the `EventName` to
82
57
avoid redundancy and to keep the event definition clean.
83
58
* The events SHOULD document their semantic conventions including event name,
84
59
attributes, and the payload.
85
60
86
61
Recommendations on using attributes vs. body fields:
87
62
88
-
* If the field should be comparable across every type of record, it should be an attribute.
63
+
* If the field should be comparable across events with different `EventName` (or between an event and other telemetry items),
64
+
it should be an attribute.
89
65
* If the field is specific to the event itself, then it should be a body field.
90
-
* Unless the same `event.name` exists on two events, anything in two event bodies is not comparable to each other.
66
+
* Body fields that belong to events with different event names are not comparable.
67
+
For example, body field `id` on event `my_company.order_submitted` is semantically different from
68
+
field `id` on an event with name `session.start`.
91
69
92
70
### Event payload (body)
93
71
94
72
* Common attribute naming conventions and [registry](../attributes-registry/README.md)
95
73
requirements don't apply to event payload fields.
96
74
* The definition for OpenTelemetry defined events supports describing
97
75
individual _fields_ (Body Fields)
98
-
* The _fields_ are unique to the named event (`event.name`) and different events
76
+
* The _fields_ are unique to the named event ([EventName](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.40.0/specification/logs/data-model.md#field-eventname)) and different events
99
77
may use the same _field_ name to represent different data, due to the unique
[EventName](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.40.0/specification/logs/data-model.md#field-eventname) MUST be`session.start`
44
44
45
45
For instrumentation that tracks user behavior during user sessions, a `session.start` event MUST be emitted
46
46
every time a session is created. When a new session is created as a continuation of a prior session,
@@ -61,7 +61,7 @@ that the previous session has ended. If the session ID in `session.previous_id`
[EventName](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.40.0/specification/logs/data-model.md#field-eventname) MUST be `session.end`
65
65
66
66
For instrumentation that tracks user behavior during user sessions, a `session.end` event SHOULD be emitted
67
67
every time a session ends. When a session ends and continues as a new session, this event SHOULD be
0 commit comments