stack/apps/backend/scripts
mantrakp04 8d124a4517 feat(analytics): spans telemetry surface + event parent_span_ids
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.
2026-07-01 17:27:54 -07:00
..
config-agent refactor: migrate config parsing from Babel AST to jiti (#1661) 2026-06-29 10:25:11 -07:00
internal-analytics perf(platform-analytics): cut ClickHouse query peak memory (#1632) 2026-06-19 12:44:28 -07:00
verify-data-integrity feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
backfill-internal-free-plans.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
benchmark-internal-metrics.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
bulldozer-payments-init.ts Make Bulldozer SQL statements deterministic 2026-04-18 16:43:26 -07:00
clickhouse-migrations.ts feat(analytics): spans telemetry surface + event parent_span_ids 2026-07-01 17:27:54 -07:00
db-migrations.ts [Feat] new scripts on migrate/seed/init run for internal (#1421) 2026-05-12 16:05:45 -07:00
db-migrations.tsdown.config.ts Fix Docker build 2026-03-09 10:49:42 -07:00
generate-keys.ts Split backend and dashboard (#83) 2024-06-18 15:49:31 +02:00
generate-migration-imports.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
generate-openapi-fumadocs.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
generate-private-sign-up-risk-engine.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
generate-route-info.ts fixes? 2025-12-12 17:29:57 -08:00
regen-internal-subscriptions-to-latest.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
run-bulldozer-studio.ts Upgrade TypeScript from 5.9.3 to 6.0.3 (#1644) 2026-06-22 17:18:15 -07:00
run-cron-jobs.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
run-email-queue.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00