Implement Session Lifecycle and State Management
Categories
(Data Platform and Tools :: Glean: SDK, task, P1)
Tracking
(Not tracked)
People
(Reporter: travis_, Assigned: travis_)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [glean-sdk-jira])
Attachments
(3 files)
Implement the session state machine in the SDK, including:
- Lifecycle modes (AUTO default, LIFECYCLE, MANUAL)
- Handling of active/inactive signals
- Inactivity timeout behavior
- Cold restart handling
- Session start/end transitions
Includes generation and management of:
- session_id (UUIDv4)
- session_seq
- event_seq
Modify event recording to:
- Attach structured session metadata to in-session events
- Emit session_start and session_end synthetic events
- Include effective session sample rate in metadata
- Update payload schema and documentation accordingly.
Implement:
- Deterministic session sampling decision at session start
- Gating of in-session telemetry when sampled out
- Runtime session_sample_rate configuration (init + remote override)
out_of_sessionexemption behavior- Diagnostic metric (glean.sessions_seen) for observability
Includes tests for sampling semantics and metadata correctness.
Updated•7 months ago
|
| Assignee | ||
Comment 1•6 months ago
•
|
||
Assuming sequential execution and ~16 weeks total duration starting March 16, 2026, here are the expected completion dates:
Step 1: Design Finalization & Architecture Approval (3 weeks)
Expected completion: April 6, 2026
Step 2: SDK/parser/pipeline implementation (estimate 6-8 weeks)
- Core Session State Machine Implementation
- Per-Session Sampling & Diagnostics
- Payload Schema & Metadata Integration
Expected completion: May 18, 2026
Step 3: Performance & Payload Impact Validation (2 weeks)
Includes Bug 2020967
Expected completion: June 8, 2026
Step 4: ETL Modeling & Pilot Rollout (3 weeks)
Includes Bug 2020968, Bug 2020970
Expected completion: June 30, 2026
Overall projected completion: July 6, 2026
(Flows will follow in a separate, later phase: Bug 2020971)
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Comment 2•5 months ago
|
||
| Assignee | ||
Comment 4•5 months ago
|
||
glean_parser changes
| Assignee | ||
Comment 5•5 months ago
|
||
pipeline schema updates PR
| Assignee | ||
Comment 6•5 months ago
•
|
||
I originally had the wrong bug for the schema updates, they are now linked here properly
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Comment 7•4 months ago
|
||
Pipeline schema PR is queued for review, which usually doesn't take long. After that lands I will need to update the copy of the schema in the SDK PR, then it and the glean_parser PRs can land. Then releases cut for Glean and glean_parser, vendoring, and collecting data for validation. I expect to get this stuff landed and released/vendored next week.
| Assignee | ||
Comment 8•4 months ago
|
||
All PRs are reviewed except the pipeline schema additions. I'll push for review on it as it needs to land first, then the other two PRs updated with the schema from the pipeline generator and then they can land too.
After landing, it will take about a week to begin to have enough data to start validating the session metadata, then a day or two to complete the initial validation. Validation will continue through vendoring into consuming applications to ensure everything is working as expected.
Once validation is completed, then work on Flow-ids and the associated metadata will begin.
| Assignee | ||
Comment 9•4 months ago
|
||
Everything has landed. Tomorrow I will work on cutting a Glean release and then we will be collecting data for the next steps of validation, and checking the payload size impact, etc.
Closing this as FIXED and moving onto the next bugs in the tree
Description
•