mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
Add a generic Spans telemetry surface alongside events, written directly to ClickHouse (spans are siblings of events, not routed through ext-db-sync). - analytics_internal.spans table (ReplacingMergeTree, versioned) + default.spans view, isolated by a row policy and granted to limited_user exactly like default.events. - Span types: $session-replay and $session-replay-segment (per browser tab), written directly from the session-replays batch route and re-written per batch so their end advances; $refresh-token, derived in the view from the synced refresh_tokens dimension. - events.parent_span_ids: additive column holding the root-first ancestor span-id list ([rti, sri, srsi]), stamped on each event insert. Typed-id prefixes live only on span ids / parent_span_ids; scalar id columns stay raw so existing customer SQL keeps working (additive, backwards compatible). - SDK: EventTracker and SessionRecorder now share one per-tab session_replay_segment_id (each previously minted its own, so events could not be correlated to a replay recording). - Dashboard: Spans tab on the analytics tables page. - Tests: spans unit tests + e2e for session replays, analytics events batch, and the analytics query surface. |
||
|---|---|---|
| .. | ||
| cli | ||
| dashboard-ui-components | ||
| js | ||
| next | ||
| react | ||
| sc | ||
| shared | ||
| shared-backend | ||
| tanstack-start | ||
| template | ||
| ui | ||