Skip to content

Commit

Permalink
add session.change event
Browse files Browse the repository at this point in the history
  • Loading branch information
breedx-splk committed May 15, 2024
1 parent 04bdbba commit 3e0ffdc
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .chloggen/session_change_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.change` event

# 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: []

# (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:
12 changes: 11 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 Change Event](#session_change_event) below).

## Attributes

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

## Session Change Event

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

When a session changes (due to time-based expiry or another mechanism), an event MAY be emitted.

The emitted event that represents a session change MUST have the `event.name=session.change`.
The event body MUST be empty and the attributes MUST include both the `session.id` and `session.previous_id`
attributes, as described above. The values MUST be different.

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md

0 comments on commit 3e0ffdc

Please sign in to comment.