Telemetry
OpenTelemetry → Grafana Cloud. Every Lambda runs two AWS Lambda extension layers that ship signals to a shared OTLP collector.
Signals
| Signal | Destination | Source |
|---|---|---|
| Traces | Tempo (grafanacloud-traces) | X-Ray + OTel instrumentation |
| Logs | Loki | Lambda structured logs (JSON) |
| Metrics | Prometheus | OTel + CloudWatch |
Architecture
flowchart LR L[Lambda] -->|AWS_LAMBDA_EXEC_WRAPPER| INST[OTel Node instrumentation] L -->|telemetryapi| COL[Collector layer - Grafana] INST -->|otlp http/protobuf localhost:4318| COL COL -->|otlphttp/drive_otlp| OTLP["otlp.<root-domain>"] OTLP --> GC[Grafana Cloud]
Two layers per Lambda (from serverless.common.yml custom.otelCollect + custom.otelInstrument):
- Collector layer (Grafana
collector-lambda-extension) — receives OTLP on localhost:4318, exports toDRIVE_OTLP_ENDPOINTwithDRIVE_OTLP_AUTH_HEADER. - Instrumentation layer (
aws-otel-nodejs-arm64) — auto-instruments Node (aws-sdk, http/https, dns, host) viaAWS_LAMBDA_EXEC_WRAPPER.
Resource attributes
Set via OTEL_RESOURCE_ATTRIBUTES:
Collector backstops service.namespace, deployment.environment(.name) (X-Ray receiver path doesn't see env vars).
Pages
| Topic | Page |
|---|---|
| Collector config, layers, OTLP export | OpenTelemetry |
| TraceQL queries in Tempo | Tracing |
| Structured JSON logs in Loki | Logs |
| CloudWatch + Prometheus metrics | Metrics |
Logger/TraceUtils lib + drive-ai attrs | drive-ai integration |