mirror of
https://github.com/mauricioabh/arbpulse.git
synced 2026-07-27 23:57:43 +00:00
a5c83ee026
Spans are now created and exported to Sentry only when SENTRY_TRACING is enabled (default off), keeping 24/7 operation within the free-tier span quota. Error monitoring stays always-on. Includes OpenSpec change gate-sentry-spans (proposal, design, specs, tasks). 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