OTEL_SERVICE_NAME
A Claude Code environment variable, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
What it is
You can now set OTEL_SERVICE_NAME, OTEL_TRACES_EXPORT_INTERVAL and CLAUDE_CODE_FORK_SUBAGENT in settings.json.
Not Anthropic's. This is the line from the earliest changelog entry here that named it, v2.1.232.
Presence across releases
The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Changelog entries naming it
-
v2.1.232Three more variables can be set from settings.json
You can now set OTEL_SERVICE_NAME, OTEL_TRACES_EXPORT_INTERVAL and CLAUDE_CODE_FORK_SUBAGENT in settings.json.
named in this entry
Documentation pages
- Observability with OpenTelemetry mentions it Claude Code CLI
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
Names beside it
Every environment variable in the inventory starting otel, up to twelve of them.
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMITNo description from anybody. 2.1.213
OTEL_EXPORTER_OTLP_ENDPOINTNo description from anybody. 2.1.138
OTEL_EXPORTER_OTLP_HEADERSNo description from anybody. 2.1.138
OTEL_EXPORTER_OTLP_INSECURENo description from anybody. 2.1.138
OTEL_EXPORTER_OTLP_LOGS_ENDPOINTNo description from anybody. 2.1.160
OTEL_EXPORTER_OTLP_LOGS_HEADERSNo description from anybody. 2.1.229
OTEL_EXPORTER_OTLP_LOGS_PROTOCOLNo description from anybody. 2.1.138
OTEL_EXPORTER_OTLP_METRICS_ENDPOINTNo description from anybody. 2.1.160
OTEL_EXPORTER_OTLP_METRICS_HEADERSNo description from anybody. 2.1.229
OTEL_EXPORTER_OTLP_METRICS_PROTOCOLNo description from anybody. 2.1.138
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCENo description from anybody. 2.1.138
OTEL_EXPORTER_OTLP_PROTOCOLNo description from anybody. 2.1.138
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.