AI agent (recommended)
The fastest way to instrument any Node.js project. The agent reads your code, detects your framework and libraries, writes the right instrumentation file, and installs packages.- Detects your framework (Express, Fastify, Next.js, NestJS, Koa, Hapi, and more)
- Reads your actual code to understand existing setup
- Writes an
instrumentation.ts(or.js) file in the project root - Installs only the OpenTelemetry packages you need
- Configures traces, metrics, and logs to send to Rocketgraph
- Bridges
console.log/warn/errorto OpenTelemetry logs automatically
After running
Next.js: Theinstrumentation.ts file is auto-loaded — no changes needed.
Express / Fastify / plain Node: Import it as the first line of your entry point:
Fallback: template mode
If you prefer not to use the AI agent:Manual setup
1. Install packages
2. Set environment variables
3. Use auto-instrumentation
The simplest approach — no code changes:instrumentation.ts for more control. See the OpenTelemetry Node.js docs for the full SDK setup.
Uninstall
Next steps
- Connect Sentry for error tracking alongside OTel traces
- Set up Railway deploy webhooks for regression detection
- Add the Slack integration for anomaly alerts