70b4aa4e92
Moves the completed change to openspec/changes/archive/ and creates the canonical openspec/specs/observability/spec.md. Co-authored-by: Cursor <cursoragent@cursor.com>
911 B
911 B
1. Tracing gate
- 1.1 Add
isTracingEnabled()helper (readsSENTRY_TRACING, truthy ="1"/"true"case-insensitive) exported from the instrumentation layer - 1.2 In
src/instrumentation/otel.ts, return the no-op tracer unless bothSENTRY_DSNandSENTRY_TRACINGare truthy (keepwithSpansignature and itsSentry.captureExceptionin catch) - 1.3 In
src/instrumentation/sentry.ts, only settracesSampleRatewhen tracing is enabled (omit it otherwise)
2. Documentation
- 2.1 Add
SENTRY_TRACING(defaultfalse) to.env.examplewith 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 typecheckpasses - 3.2
npm testpasses - 3.3 Manually confirm: with
SENTRY_TRACINGunset, no spans are emitted; error capture path unaffected