DocsUsageSession semantics
Usage

Session semantics

Understand how the Flutter SDK rotates sessions and how the engine stores the session handle for analysis and replay correlation.

Source of truthsdk/sankofa_flutter/lib/sankofa_flutter.dartserver/engine/cmd/sankofa/main.go

The Flutter SDK owns session lifecycle on the client side.

How session refresh works

Before a track call is recorded, the SDK:

  • loads the existing session ID
  • checks the last event timestamp
  • creates a new session when the timeout has elapsed
  • writes the updated timestamp back to storage

The session ID is injected into event properties as $session_id.

Why that matters

The engine promotes $session_id into a dedicated field. That makes session analysis useful for:

  • replay correlation
  • funnel debugging
  • investigation feeds
  • anomaly triage

Session ID is currently client-driven

The core engine does not create the session itself on v1 ingest. It promotes the session field when the client includes $session_id in event properties.