Skip to content

feat(observability): add privacy-bounded endpoint health - #107

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
feat/app-health-endpoint-monitoring
Sep 29, 2026
Merged

sarthakagrawal927 merged 1 commit into
mainfrom
feat/app-health-endpoint-monitoring

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Summary

  • Add the official App Health 0.4.0 Hono adapter to API and personal-service Worker routes.
  • Resolve the existing optional APP_HEALTH_INGEST_KEY lazily; with no key the middleware is a no-op. Keep a bounded queue/batch, one retry, one-second timeout, and background waitUntil flush.
  • Let the SDK use Hono's matched static route templates. It sends method, route template, response status, duration, timestamp, and declared response-size scalar; request bodies, headers, cookies, query values, concrete route parameters, account IDs, and profile details are not endpoint telemetry.
  • Preserve the existing signup event while replacing its email title and ID/name properties with the fixed title New account created and no user properties.
  • Update both source and served privacy-page copies to explain the optional generic signup signal and aggregate endpoint measurements.

The signup-log privacy correction is separate from endpoint metrics but directly related: both use the existing optional App Health ingestion path. The privacy page now describes them as separate signals.

Verification

  • pnpm exec biome check src/worker.ts src/worker/endpoint-health.ts src/worker-endpoint-health.test.ts src/server/auth.ts marketing/privacy/index.md
  • pnpm typecheck
  • pnpm exec vitest run src/worker-endpoint-health.test.ts (4 passed)
  • pnpm build
  • pnpm exec wrangler deploy --dry-run --outdir /tmp/calorie-app-health-worker-dry-run

No secret was provisioned, no production configuration or deployment was changed, and no live receipt is claimed.

Closes #106

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add optional privacy-bounded App Health endpoint metrics

1 participant