Skip to content

[v1.0] telemetry abstraction (single wrapper) #232

@Jonathangadeaharder

Description

@Jonathangadeaharder

Telemetry abstraction

Goal

A single thin wrapper (src/lib/telemetry.ts) is the only place that imports a vendor SDK. Every event, error, and pageview goes through it.

Tasks

  • Define tilt-app/src/lib/telemetry.ts with track, pageview, captureError, identify, reset
  • No vendor SDK imported anywhere else; ESLint rule blocks direct imports of posthog-js, @sentry/*
  • Default backend: PostHog (matches user's broader stack); fall back to a no-op when PUBLIC_POSTHOG_KEY is missing
  • Hook into SvelteKit handle for pageviews and handleError for unhandled exceptions
  • Document in README

Acceptance

rg "posthog|sentry" in source returns matches only in the telemetry wrapper file and package.json.

Metadata

Metadata

Labels

p1v1.0 release blockertelemetryObservability/telemetry workv1.0Clean v1.0 release work

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions