Open Bug 2077127 Opened 1 month ago Updated 2 days ago

[meta] Flows in Glean: declarative, session-scoped funnel instrumentation

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: travis_, Unassigned)

References

(Depends on 8 open bugs)

Details

A flow is a named task type declared in a new flows.yaml. Its lifecycle is driven by events the product already records: starts_on opens an instance, ends_on closes it, and includes lists the other member events. Events recorded while an instance is active carry a flows entry naming it. There is no application API, and adopting flows requires no change to existing metric definitions.

Goals:

  1. Funnel membership declared in one place.
  2. Each flow instance identified by (session_id, flow_seq), without a new random identifier.
  3. Each instance terminated exactly once, with a reason that distinguishes a conclusive outcome from a censored one.
  4. A per-flow remote kill switch.
  5. Flows shown in the Glean Dictionary, on the flow's page and on each member event's page.

Open questions from the proposal, to settle before work starts on the bugs they affect:

  • Does auto_close_timeout measure absolute duration or inactivity? Affects the timeout bug and the parser's validation.
  • Is auto_close_timeout required? Affects the parser bug.
  • Should glean.flows_not_started use a static label set, or should the dynamic label cap be raised? Affects the diagnostic bug.
  • Is a test accessor for live flow state needed? To be decided in the lifecycle bug.
Depends on: 2077129
Depends on: 2077130
Depends on: 2077131
Depends on: 2077133
Depends on: 2077136
Depends on: 2077137
Depends on: 2077138
Depends on: 2077147
Depends on: 2077146
Depends on: 2077144
Depends on: 2077141
Depends on: 2077143
Depends on: 2077154
Depends on: 2077151
Depends on: 2077149

Decisions on the open questions in the description have been made as I have been digging into the implementation:

  • Does auto_close_timeout measure absolute duration or inactivity? Affects the timeout bug and the parser's validation.
    • Answered: absolute duration
  • Is auto_close_timeout required? Affects the parser bug.
    • Answered: yes
  • Should glean.flows_not_started use a static label set, or should the dynamic label cap be raised? Affects the diagnostic bug.
    • Answered: static labels for now, to facilitate validation client-side
  • Is a test accessor for live flow state needed? To be decided in the lifecycle bug.
    • Answered: No, current event testGetValue is sufficent
Depends on: 2095137
You need to log in before you can comment on or make changes to this bug.