Dashboard › opencode-lore › Sentry telemetry, tracing, and test-iso…
01a0a519-f169-7501-a1ca-7a152b8d509fTreat NODE_ENV === "test" as an unconditional Sentry hard-off checked before all enablement logic, even SENTRY_ENABLED=1. Tests must never initialize transports or worker threads: Sentry uses globalThis.fetch, so initialization races mocked fetches, inflates call counts, and clobbers captured state. Outside tests, label production builds "production" and explicitly enabled development builds "development". Keep one tracing owner: use httpServerSpansIntegration without also installing the superseded httpIntegration, preventing duplicate events and overlapping instrumentation.