feat: page views in posthog and api errors in sentry #18

Merged
jalenluorion merged 2 commits from feat/observability into main 2026-10-03 02:58:49 +00:00
Member

Uses the sentry and posthog features governance provisions for this repo (prod profile only).

  • api: sentry-sdk with the Flask integration, started only when SENTRY_DSN is set, no PII, release from COMMIT_HASH.
  • web: posthog-js page views only (no autocapture, replay or surveys). The root layout passes POSTHOG_KEY/POSTHOG_HOST at request time, since kennel injects secrets after the Nix build.
  • secretspec: the three keys declared optional under [profiles.prod].

Sentry will stay off in prod until governance writes SENTRY_DSN as a string: today it stores the whole Sentry key object, which secretspec treats as unset. PostHog works once deployed.

Verified locally against fake Sentry/PostHog endpoints; with no keys set nothing is sent. API tests pass; web build and typecheck pass.

Uses the sentry and posthog features governance provisions for this repo (prod profile only). - api: sentry-sdk with the Flask integration, started only when SENTRY_DSN is set, no PII, release from COMMIT_HASH. - web: posthog-js page views only (no autocapture, replay or surveys). The root layout passes POSTHOG_KEY/POSTHOG_HOST at request time, since kennel injects secrets after the Nix build. - secretspec: the three keys declared optional under [profiles.prod]. Sentry will stay off in prod until governance writes SENTRY_DSN as a string: today it stores the whole Sentry key object, which secretspec treats as unset. PostHog works once deployed. Verified locally against fake Sentry/PostHog endpoints; with no keys set nothing is sent. API tests pass; web build and typecheck pass.
Initialize sentry-sdk with the Flask integration when SENTRY_DSN is set.
Governance writes it for the prod profile only, so dev, CI and tests run
without it and nothing is reported. Declared optional in secretspec.toml.
feat(web): add posthog page views
Some checks failed
kennel/build build succeeded
CI / check (pull_request) Has been cancelled
CI / check-1 (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
767bb11c84
Initialize posthog-js in the browser when POSTHOG_KEY is set, capturing
page views only: autocapture, session replay and surveys are off. The
root layout reads the key and host at request time and passes them down,
because kennel injects secrets after the Nix build, so NEXT_PUBLIC_
build-time values would be empty. Declared optional in secretspec.toml.
jalenluorion force-pushed feat/observability from 767bb11c84
Some checks failed
kennel/build build succeeded
CI / check (pull_request) Has been cancelled
CI / check-1 (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
to 01a8286485
All checks were successful
kennel/build build succeeded
CI / check-1 (pull_request) Successful in 2m34s
CI / build (pull_request) Successful in 6m8s
CI / check (pull_request) Successful in 0s
2026-10-03 02:57:38 +00:00
Compare
jalenluorion deleted branch feat/observability 2026-10-03 02:58:49 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/cal!18
No description provided.