Class SessionStartEvent
-
- All Implemented Interfaces:
-
io.opentelemetry.android.semconv.events.OpenTelemetryEvent
public final class SessionStartEvent implements OpenTelemetryEvent
<p>Indicates that a new session has been started, optionally linking to the prior session.</p> <p>Notes:</p> <p>For instrumentation that tracks user behavior during user sessions, a <c>session.start</c> event MUST be emitted every time a session is created. When a new session is created as a continuation of a prior session, the <c>session.previous_id</c> SHOULD be included in the event. The values of <c>session.id</c> and <c>session.previous_id</c> MUST be different. When the <c>session.start</c> event contains both <c>session.id</c> and <c>session.previous_id</c> fields, the event indicates that the previous session has ended. If the session ID in <c>session.previous_id</c> has not yet ended via explicit <c>session.end</c> event, then the consumer SHOULD treat this continuation event as semantically equivalent to <c>session.end(session.previous_id)</c> and <c>session.start(session.id)</c>.</p>
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringSESSION_START_EVENT_NAMEprivate final StringsessionIdprivate final StringsessionPreviousId
-
Constructor Summary
Constructors Constructor Description SessionStartEvent(String sessionId, String sessionPreviousId)
-
Method Summary
Modifier and Type Method Description final StringgetSessionId()<p>The ID of the new session being started.</p> final StringgetSessionPreviousId()<p>The previous <c>session.id</c> for this user, when known.</p> Unitemit(Logger logger, Attributes additionalAttributes)Emits this event through logger, including any additionalAttributes. -
-
Method Detail
-
getSessionId
final String getSessionId()
<p>The ID of the new session being started.</p>
-
getSessionPreviousId
final String getSessionPreviousId()
<p>The previous <c>session.id</c> for this user, when known.</p>
-
emit
Unit emit(Logger logger, Attributes additionalAttributes)
Emits this event through logger, including any additionalAttributes.
-
-
-
-