Skip to content

Sentry: SDK integration + optional DSN seam (off by default) #999

Description

@JSONbored

Part of #998.

Context

Wire @sentry/cloudflare into the Worker, initialised from an optional SENTRY_DSN. No DSN ⇒ no init ⇒ zero overhead. Hosted uses gittensory's DSN; self-host uses the operator's.

Deliverables

  • Add @sentry/cloudflare; init Sentry in the Worker entry (fetch / queue / scheduled), guarded by SENTRY_DSN.
  • Optional bindings: SENTRY_DSN (+ SENTRY_ENVIRONMENT, SENTRY_TRACES_SAMPLE_RATE, SENTRY_RELEASE), documented as optional.
  • Wrap the engine handlers so uncaught errors are captured (with minimal context — no request bodies).
  • Release tagging from the deploy SHA.

Requirements / acceptance

  • Unset DSN = Sentry fully inert (no network, no perf cost) — covered by a test.
  • tsc --noEmit + vitest run green.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions