Skip to content

Commit

Permalink
Session.id semantic convention (#215)
Browse files Browse the repository at this point in the history
Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 22, 2023
1 parent 6166960 commit a89f573
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ release.

## Unreleased

- Adds `session.id` and session.md to general docs and model
([#215](https://github.com/open-telemetry/semantic-conventions/pull/215))
- Add `cluster.name` and `node.name` attributes to Elasticsearch semantic conventions.
([#285](https://github.com/open-telemetry/semantic-conventions/pull/285))
- Fix the unit of metric.process.runtime.jvm.system.cpu.load_1m to be {run_queue_item}
Expand Down
22 changes: 22 additions & 0 deletions docs/general/session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Semantic conventions for session

**Status**: [Experimental][DocumentStatus]

This document defines semantic conventions to apply to client-side applications when tracking sessions.

Session is defined as the period of time encompassing all activities performed by the application and the actions
executed by the end user.

Consequently, a Session is represented as a collection of Logs, Events, and Spans emitted by the Client Application
throughout the Session's duration. Each Session is assigned a unique identifier, which is included as an attribute in
the Logs, Events, and Spans generated during the Session's lifecycle.

## Attributes

<!-- semconv session-id -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `session.id` | string | A unique id to identify a session. | `00112233-4455-6677-8899-aabbccddeeff` | Opt-In |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
17 changes: 17 additions & 0 deletions model/session.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
groups:
- id: session-id
prefix: session
type: attribute_group
brief: >
Session is defined as the period of time encompassing all activities performed by the application and the actions
executed by the end user.
Consequently, a Session is represented as a collection of Logs, Events, and Spans emitted by the Client Application
throughout the Session's duration. Each Session is assigned a unique identifier, which is included as an attribute in
the Logs, Events, and Spans generated during the Session's lifecycle.
attributes:
- id: id
type: string
brief: "A unique id to identify a session."
examples: "00112233-4455-6677-8899-aabbccddeeff"
requirement_level: opt_in

0 comments on commit a89f573

Please sign in to comment.