{"name":"OTEL_EXPORTER_OTLP_METRICS_PROTOCOL","slug":"otel-exporter-otlp-metrics-protocol","family":"env","title":"Environment variables","noun":"environment variable","description":"When metrics are sent over OpenTelemetry by gRPC or HTTP protobuf, Claude Code now prepares an extra resource before creating the exporter","description_source":"entry","described_by":{"version":"2.1.307","anchor":"otlp-metrics-exporter-wrapped-in-a-scoped-resource"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.307","anchor":"otlp-metrics-exporter-wrapped-in-a-scoped-resource","heading":"OpenTelemetry metrics export is set up a little differently","line":"When metrics are sent over OpenTelemetry by gRPC or HTTP protobuf, Claude Code now prepares an extra resource before creating the exporter","released_at":"2026-10-21 20:47:18","reason":"named in this entry, found in this entry's text"}],"entries_total":1,"docs":[{"source":"claude-code","path":"monitoring-usage","title":"Monitoring","documented":false}],"docs_total":1,"gates":[],"related":[{"name":"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT","slug":"otel-exporter-otlp-metrics-endpoint","description":"In remote sessions, usage metrics can now go to the session's own metrics address, signed with `CLAUDE_CODE_SESSION_ACCESS_TOKEN`"},{"name":"OTEL_EXPORTER_OTLP_METRICS_HEADERS","slug":"otel-exporter-otlp-metrics-headers","description":"Comma-separated `key=value` headers for OTLP metric exports; the bundled exporters merge it over `OTEL_EXPORTER_OTLP_HEADERS`, its values winning on a clash. While it is set, Claude Code skips some of its built-in routes that attach its own `Authorization: Bearer` token to metric exports, including the remote session ingress collector."},{"name":"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE","slug":"otel-exporter-otlp-metrics-temporality-preference","description":"Set OTEL_METRICS_EXPORTER=prometheus and child sessions report through the runner, giving one scrape target per machine."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/otel-exporter-otlp-metrics-protocol","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}