Files
arbpulse/openspec/changes/archive/2026-07-16-gate-sentry-spans/tasks.md
T
Mauricio Barragan 70b4aa4e92 chore(openspec): archive gate-sentry-spans and sync observability spec
Moves the completed change to openspec/changes/archive/ and creates the canonical openspec/specs/observability/spec.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:07:13 -06:00

911 B

1. Tracing gate

  • 1.1 Add isTracingEnabled() helper (reads SENTRY_TRACING, truthy = "1"/"true" case-insensitive) exported from the instrumentation layer
  • 1.2 In src/instrumentation/otel.ts, return the no-op tracer unless both SENTRY_DSN and SENTRY_TRACING are truthy (keep withSpan signature and its Sentry.captureException in catch)
  • 1.3 In src/instrumentation/sentry.ts, only set tracesSampleRate when tracing is enabled (omit it otherwise)

2. Documentation

  • 2.1 Add SENTRY_TRACING (default false) to .env.example with a note it gates spans for free-tier safety
  • 2.2 Update the README observability section to describe the flag and default-off behavior

3. Verification

  • 3.1 npm run typecheck passes
  • 3.2 npm test passes
  • 3.3 Manually confirm: with SENTRY_TRACING unset, no spans are emitted; error capture path unaffected