Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session start and end events #1091

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5f6587b
add session.change event
breedx-splk May 15, 2024
89f21fd
add pr number
breedx-splk May 15, 2024
1830aea
fix anchor
breedx-splk May 15, 2024
c269ce9
remove space
breedx-splk May 15, 2024
684b954
add session start and end events
breedx-splk May 29, 2024
0d5c367
update changelog
breedx-splk May 29, 2024
fcbfd70
linted
breedx-splk May 29, 2024
e873fbe
revert formatting in other section ¯\_(ツ)_/¯
breedx-splk May 29, 2024
1ce116d
add semantic clarification
breedx-splk Jun 3, 2024
e923bac
Merge branch 'main' into session_start_and_end_events
breedx-splk Jun 4, 2024
5edd400
fix copypasta
breedx-splk Jun 4, 2024
768692a
Merge branch 'main' into session_start_and_end_events
breedx-splk Jun 4, 2024
4a73b11
add experimental to each body field. yup.
breedx-splk Jun 7, 2024
b049ab0
Merge branch 'main' into session_start_and_end_events
joaopgrassi Jun 13, 2024
fffaf0f
Update docs/general/session.md
breedx-splk Jun 13, 2024
9f6e119
Update docs/general/session.md
breedx-splk Jun 13, 2024
3d03f2f
Update docs/general/session.md
breedx-splk Jun 13, 2024
a7cecf9
Merge branch 'main' into session_start_and_end_events
breedx-splk Jun 13, 2024
c50a83c
Merge branch 'main' into session_start_and_end_events
joaopgrassi Jun 18, 2024
c40e2f2
Merge branch 'main' into session_start_and_end_events
breedx-splk Jun 20, 2024
7f4cefc
Merge branch 'main' into session_start_and_end_events
breedx-splk Jun 25, 2024
a77f16a
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 9, 2024
d7fed5c
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 9, 2024
18cd7e3
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 19, 2024
ee74a89
Update docs/general/session.md
breedx-splk Jul 19, 2024
402a947
Update docs/general/session.md
breedx-splk Jul 19, 2024
c576469
Update docs/general/session.md
breedx-splk Jul 19, 2024
1d16b2e
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 22, 2024
838080e
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 23, 2024
929d3c3
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 24, 2024
46f22a0
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 29, 2024
29035f9
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 30, 2024
9a996c6
Merge branch 'main' into session_start_and_end_events
breedx-splk Jul 30, 2024
06c2100
Merge branch 'main' into session_start_and_end_events
lmolkova Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/session_start_end_event.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'enhancement'

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: 'session'

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add new experimental `session.start` and `session.end` events

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1091]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
39 changes: 38 additions & 1 deletion docs/general/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ the Logs, Events, and Spans generated during the Session's lifecycle.

When a session reaches end of life, typically due to user inactivity or session timeout, a new session identifier
will be assigned. The previous session identifier may be provided by the instrumentation so that telemetry
backends can link the two sessions.
backends can link the two sessions (see [Session Start Event](#session-start-event) below).

## Attributes

Expand All @@ -35,4 +35,41 @@ backends can link the two sessions.
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Session Events
lmolkova marked this conversation as resolved.
Show resolved Hide resolved

### Session Start Event

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

`event.name` 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,
the `session.previous_id` SHOULD be included in the event. The values of `session.id` and `session.previous_id`
MUST be different.

When the `session.start` event contains both `session.id` and `session.previous_id` fields, the event then implies
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)`.

| 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
breedx-splk marked this conversation as resolved.
Show resolved Hide resolved
| [`session.previous_id`](/docs/attributes-registry/session.md) | string | The previous `session.id` for this user, when known. | `Conditionally Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

### Session End Event

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

`event.name` MUST be `session.end`

For instrumentation that tracks user behavior during user sessions, a `session.end` event SHOULD be emitted
breedx-splk marked this conversation as resolved.
Show resolved Hide resolved
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.
breedx-splk marked this conversation as resolved.
Show resolved Hide resolved
breedx-splk marked this conversation as resolved.
Show resolved Hide resolved

| 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
Loading