Prerequisites
- Node.js 18+
- Your Rocketlog ingress endpoint:
https://{your-ingress-endpoint}.rocketgraph.app
1. Install the auto-instrumentation package
Install the OpenTelemetry API and the Node auto-instrumentations metapackage:http, express, pg, redis, mongodb, and many other libraries. See OpenTelemetry JS auto-instrumentations for the full list.
2. Configure via environment variables
Point the OTLP exporter at your Rocketlog ingress and set your service name:Replace
{your-ingress-endpoint} with your actual Rocketlog ingress host (no path). The SDK will append the correct OTLP paths for traces, metrics, and logs.- OTEL_EXPORTER_OTLP_PROTOCOL — Use
http/protobuf(common for HTTP) orgrpc. - OTEL_RESOURCE_ATTRIBUTES — Add attributes such as
deployment.environment=productionork8s.pod.name=my-pod.
3. Run your application
Load the auto-instrumentation module with Node’s--require flag so it runs before your app. Your existing entry file stays the same:
tracing.js that registers the same auto-instrumentations and uses env vars for the endpoint:
Custom protocol
If your Rocketlog endpoint expects gRPC:Next steps
- Add custom metrics in Node.js.
- Configure log enrichment (e.g. deployment and Kubernetes instance ID).
- Set up alerts and SLOs in Rocketlog.