Sentry logged [Sentry] express is not instrumented at startup because express/cors/@prisma/client were required at the top of backend/src/index.js, before Sentry.init() ran. Sentry's auto-instrumentation patches those modules via a require hook, which only works if Sentry.init() runs first.
Sentry.init() now runs immediately after dotenv.config(), before any Sentry-instrumented library is required.
Version bumped to 1.10.2.
Test plan
Backend Jest suite (21 tests) passes
Booted the backend locally with a test SENTRY_DSN set — confirmed the "not instrumented" warning no longer appears and the server serves requests normally
## Summary
- Sentry logged `[Sentry] express is not instrumented` at startup because `express`/`cors`/`@prisma/client` were required at the top of `backend/src/index.js`, before `Sentry.init()` ran. Sentry's auto-instrumentation patches those modules via a require hook, which only works if `Sentry.init()` runs first.
- `Sentry.init()` now runs immediately after `dotenv.config()`, before any Sentry-instrumented library is required.
- Version bumped to 1.10.2.
## Test plan
- [x] Backend Jest suite (21 tests) passes
- [x] Booted the backend locally with a test `SENTRY_DSN` set — confirmed the "not instrumented" warning no longer appears and the server serves requests normally
https://claude.ai/code/session_01CSWFWQsjTc9GyffPiXEDQT
express, cors, and @prisma/client were required at the top of
backend/src/index.js before Sentry.init() ran, so Sentry's
auto-instrumentation (which patches those modules via a require hook)
missed them — startup logged "[Sentry] express is not instrumented".
Sentry.init() now runs immediately after dotenv.config(), before any
of the libraries it instruments are required.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CSWFWQsjTc9GyffPiXEDQT
joshua
merged commit 798156efe6 into main2026-08-28 13:22:56 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
[Sentry] express is not instrumentedat startup becauseexpress/cors/@prisma/clientwere required at the top ofbackend/src/index.js, beforeSentry.init()ran. Sentry's auto-instrumentation patches those modules via a require hook, which only works ifSentry.init()runs first.Sentry.init()now runs immediately afterdotenv.config(), before any Sentry-instrumented library is required.Test plan
SENTRY_DSNset — confirmed the "not instrumented" warning no longer appears and the server serves requests normallyhttps://claude.ai/code/session_01CSWFWQsjTc9GyffPiXEDQT