Prerequisites
- Python 3.8+
- Your Rocketlog ingress endpoint:
https://{your-ingress-endpoint}.rocketgraph.app
1. Install packages
Install the OpenTelemetry distro (SDK + auto-instrumentation) and OTLP exporter, then install instrumentations for common libraries:requests, flask, django, redis, psycopg2, and others. See OpenTelemetry Python automatic instrumentation 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 use the correct OTLP paths for traces, metrics, and logs.- OTEL_EXPORTER_OTLP_PROTOCOL — Use
http/protobuf(default for HTTP) orgrpcdepending on what your endpoint supports. - OTEL_RESOURCE_ATTRIBUTES — Add attributes like
deployment.environment=productionork8s.pod.name=my-pod.
3. Run your application
Start your app with the OpenTelemetry instrumenter. It wraps your process and automatically captures spans, metrics, and logs from supported libraries:Custom port or protocol
If your Rocketlog endpoint uses a non-default port or gRPC:Next steps
- Add custom metrics in Python.
- Configure log enrichment (e.g. deployment and Kubernetes instance ID).
- Set up alerts and SLOs in Rocketlog.