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
[EventName](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.41.0/specification/logs/data-model.md#field-eventname) MUST be`session.start`
56
+
Indicates that a new session has been started, optionally linking to the prior session.
57
+
58
+
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, the `session.previous_id` SHOULD be included in the event. The values of `session.id` and `session.previous_id` MUST be different.
59
+
When the `session.start` event contains both `session.id` and `session.previous_id` fields, the event indicates that the previous session has ended. If the session ID in `session.previous_id` has not yet ended via explicit `session.end` event, then the consumer SHOULD treat this continuation event as semantically equivalent to `session.end(session.previous_id)` and `session.start(session.id)`.
|[`session.id`](/docs/attributes-registry/session.md)| string | The ID of the new session being started. |`00112233-4455-6677-8899-aabbccddeeff`|`Required`||
64
+
|[`session.previous_id`](/docs/attributes-registry/session.md)| string | The previous `session.id` for this user, when known. |`00112233-4455-6677-8899-aabbccddeeff`|`Conditionally Required`[1]||
65
+
66
+
**[1]`session.previous_id`:** If the new session is being created as a continuation of a previous session, the `session.previous_id` SHOULD be included in the event. The `session.id` and `session.previous_id` attributes MUST have different values.
67
+
68
+
<!-- markdownlint-restore -->
69
+
<!-- prettier-ignore-end -->
70
+
<!-- END AUTOGENERATED TEXT -->
71
+
<!-- endsemconv -->
48
72
49
-
For instrumentation that tracks user behavior during user sessions, a `session.start` event MUST be emitted
50
-
every time a session is created. When a new session is created as a continuation of a prior session,
51
-
the `session.previous_id` SHOULD be included in the event. The values of `session.id` and `session.previous_id`
52
-
MUST be different.
73
+
## Event: `session.end`
53
74
54
-
When the `session.start` event contains both `session.id` and `session.previous_id` fields, the event then implies
55
-
that the previous session has ended. If the session ID in `session.previous_id` has not yet ended via explicit
56
-
`session.end` event, then the consumer SHOULD treat this continuation event as semantically equivalent to
57
-
`session.end(session.previous_id)` and `session.start(session.id)`.
75
+
<!-- semconv event.session.end -->
76
+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
77
+
<!-- see templates/registry/markdown/snippet.md.j2 -->
78
+
<!-- prettier-ignore-start -->
79
+
<!-- markdownlint-capture -->
80
+
<!-- markdownlint-disable -->
58
81
59
-
| Body field | Type | Description |[Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/)| Stability |
|[`session.id`](/docs/attributes-registry/session.md)| string | The ID of the new session being started. |`Required`||
62
-
|[`session.previous_id`](/docs/attributes-registry/session.md)| string | The previous `session.id` for this user, when known. |`Conditionally Required`||
[EventName](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.41.0/specification/logs/data-model.md#field-eventname) MUST be `session.end`
88
+
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 emitted prior to the `session.start` event.
69
89
70
-
For instrumentation that tracks user behavior during user sessions, a `session.end` event SHOULD be emitted
71
-
every time a session ends. When a session ends and continues as a new session, this event SHOULD be
|[`session.id`](/docs/attributes-registry/session.md)| string | The ID of the session being ended. |`00112233-4455-6677-8899-aabbccddeeff`|`Required`||
73
93
74
-
| Body field | Type | Description |[Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/)| Stability |
|[`session.id`](/docs/attributes-registry/session.md)| string | The ID of the new session being ended. |`Required`||
0 commit comments