OpenTelemetry environment variable reference for Belvador
Export, identity, sampling, batching and off-switch variables, plus the runtime-specific ones Belvador's recipes use.
On this page
Every OpenTelemetry SDK reads the same standard variables. This page lists the ones that matter for Belvador, what to set them to, and the runtime-specific ones the recipes use. The quickstart shows the block with your project filled in.
Export#
| Variable | Value for Belvador | Notes |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | https://ingest.belvador.dev/otlp/<project-id> | The exporter appends /v1/traces and /v1/logs |
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Full URL including /v1/traces or /v1/logs | Only if you send each signal somewhere different |
OTEL_EXPORTER_OTLP_PROTOCOL | http/protobuf | http/json also works; grpc does not — use a Collector |
OTEL_EXPORTER_OTLP_HEADERS | Authorization=Bearer%20<ingest key> | Comma-separated key=value pairs, values percent-encoded |
OTEL_EXPORTER_OTLP_COMPRESSION | gzip (optional) | Quotas and the rate limit count bytes as received, so compression stretches both |
OTEL_EXPORTER_OTLP_TIMEOUT | Default (10000 ms) | Raise only for slow networks |
OTEL_TRACES_EXPORTER | otlp | none stops traces |
OTEL_LOGS_EXPORTER | otlp | none stops logs |
OTEL_METRICS_EXPORTER | none, or otlp to send metrics | Needs a key with Metrics; set OTEL_METRIC_EXPORT_INTERVAL=60000 with it |
Identity#
| Variable | Value | Notes |
|---|---|---|
OTEL_SERVICE_NAME | Your service's name | Shown in Traces, Logs and the Connection tab |
OTEL_RESOURCE_ATTRIBUTES | deployment.environment.name=production | Comma-separated; add service.version=<release> to tell deploys apart |
Records without an environment are stored with an empty one; a key restricted to some environments drops them.
Sampling and propagation#
| Variable | Value | Notes |
|---|---|---|
OTEL_TRACES_SAMPLER | parentbased_traceidratio | Follows the caller's decision; see Sampling and cost |
OTEL_TRACES_SAMPLER_ARG | 0.1 … 1 | Share of new traces kept |
OTEL_PROPAGATORS | Default (tracecontext,baggage) | W3C Trace Context, the same headers the Belvador SDK sends |
Batching#
| Variable | Default | When to change |
|---|---|---|
OTEL_BSP_SCHEDULE_DELAY, OTEL_BLRP_SCHEDULE_DELAY | 5000 ms (traces), 1000 ms (logs) | Lower for short-lived processes |
OTEL_BSP_MAX_EXPORT_BATCH_SIZE, OTEL_BLRP_MAX_EXPORT_BATCH_SIZE | 512 | Lower if requests hit 413 (over 4 MiB) |
OTEL_BSP_MAX_QUEUE_SIZE, OTEL_BLRP_MAX_QUEUE_SIZE | 2048 | Raise for bursts; records beyond the queue are dropped in your process |
Turning it off#
OTEL_SDK_DISABLED=true disables the SDK in runtimes that support it (Node.js, Python, Java, Go's env-based setup ignores it). Unsetting OTEL_EXPORTER_OTLP_ENDPOINT sends to localhost:4318 instead, which usually fails quietly — prefer OTEL_TRACES_EXPORTER=none and OTEL_LOGS_EXPORTER=none.
Runtime-specific variables in the recipes#
| Variable | Runtime | Why the recipe sets it |
|---|---|---|
OTEL_SEMCONV_STABILITY_OPT_IN=http | Node.js, Python | Stable HTTP attribute names (url.path, http.request.method, http.response.status_code) |
OTEL_NODE_RESOURCE_DETECTORS=env,host,os | Node.js | Leaves out the process detector, which copies the command line into every span |
OTEL_NODE_DISABLED_INSTRUMENTATIONS | Node.js | Comma-separated instrumentations to skip (fs,dns,net) |
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true | Python | Sends logging records |
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS | Python | Comma-separated instrumentations to skip |
OTEL_DENO=true | Deno | Turns on the built-in exporter |
JAVA_TOOL_OPTIONS=-javaagent:… | Java | Attaches the agent where you cannot change the start command |
Spotted something wrong or missing? Tell us: hello@belvador.dev