Skip to content

[P1] Add real-traffic outcome metrics for chat, pusher, and capture finalization #9786

Closed

Description

@Git-on-my-level

Problem

Omi has infrastructure and component telemetry, but it still lacks a complete, privacy-safe real-traffic outcome contract for the core journeys that determine whether users can actually use the product. This issue deliberately excludes synthetic canaries and generated traffic.

The currently proposed metric slice exposed concrete gaps:

  • chat_response is defined in the shared journey metric contract but is not yet instrumented on the production /v2/messages stream boundary.
  • Pusher session outcome currently risks classifying normal client disconnects as failures, which would make success-rate alerts noisy and misleading.
  • Capture finalization increments acceptance when durable work is created, but a job that remains nonterminal needs explicit reconciliation/age semantics so accepted-minus-terminal is interpretable.
  • Dashboard and alert coverage must be complete for the core journeys, while correctly separating an application outcome from an absent metric source.

Goal

Make the following journeys observable from real beta/dev and production traffic, independently per environment:

  1. Chat request accepted → terminal response visible/terminal failure.
  2. Realtime pusher session accepted → healthy terminal session/error terminal outcome.
  3. Capture/transcription finalization accepted → durable finalization success, terminal failure, or explicitly reconciled stale work.

Scope

  • Add or complete a closed-label Prometheus contract:
    • acceptance counter;
    • terminal counter with a small allowlisted outcome set;
    • latency histogram from acceptance to terminal outcome where a durable boundary exists.
  • Instrument authoritative production boundaries, including streaming success, error, and cancellation/disconnect cases.
  • Treat WebSocket close codes 1000 and 1001 as normal session completion unless a stronger application failure signal exists; do not classify a normal client disconnect as an application failure.
  • Add a bounded reconciliation/stale-work signal for capture finalization so terminal accounting is meaningful.
  • Add dashboard success-rate/latency views and conservative alerts only when meaningful real traffic is present.
  • Compare each environment only to its own seasonal baseline. Dev/beta and production are isolated by their Prometheus instances; do not add user IDs, conversation IDs, request IDs, raw errors, or content as labels.
  • Alert semantics must distinguish no traffic, no data/scrape failure, and product failure. Do not use synthetic traffic.
  • Add route/lifecycle-level tests proving each production boundary emits the expected metrics, plus close-code and stale-work tests.
  • Document exact outcome semantics, false negatives, expected scrape targets, and the fact that this is observability—not a guarantee of client render acknowledgement where that signal is unavailable.

Out of scope

Acceptance criteria

  • Chat, pusher, and capture-finalization each emit tested accepted + terminal outcome metrics on real traffic paths.
  • Pusher normal disconnects do not inflate failed-session counts.
  • Capture-finalization acceptance has a bounded, observable terminal/reconciliation story.
  • Each environment uses its own baseline; there is no beta-vs-prod rate comparison.
  • Dashboard includes success-rate and latency views for all three journeys.
  • Alerts are traffic-gated, conservative, and have documented no-data semantics.
  • Metric labels are closed, privacy-safe, and verified by tests.
  • Documentation states known blind spots and client-visible limitations.

Related

Activity

  1. added
    backend
    p1
    on Jul 15, 2026
  2. undivisible commented on Jul 26, 2026

    @undivisible
    Collaborator

    Follow-up in #10678: exhausted private-cloud upload retries now increment a closed-label terminal drop metric and mark the Pusher journey as failed instead of reporting a successful session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendp1reliability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions