Skip to content

OpenTelemetry environment variable reference for Belvador

Export, identity, sampling, batching and off-switch variables, plus the runtime-specific ones Belvador's recipes use.

Markdown
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#

VariableValue for BelvadorNotes
OTEL_EXPORTER_OTLP_ENDPOINThttps://ingest.belvador.dev/otlp/<project-id>The exporter appends /v1/traces and /v1/logs
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_LOGS_ENDPOINTFull URL including /v1/traces or /v1/logsOnly if you send each signal somewhere different
OTEL_EXPORTER_OTLP_PROTOCOLhttp/protobufhttp/json also works; grpc does not — use a Collector
OTEL_EXPORTER_OTLP_HEADERSAuthorization=Bearer%20<ingest key>Comma-separated key=value pairs, values percent-encoded
OTEL_EXPORTER_OTLP_COMPRESSIONgzip (optional)Quotas and the rate limit count bytes as received, so compression stretches both
OTEL_EXPORTER_OTLP_TIMEOUTDefault (10000 ms)Raise only for slow networks
OTEL_TRACES_EXPORTERotlpnone stops traces
OTEL_LOGS_EXPORTERotlpnone stops logs
OTEL_METRICS_EXPORTERnone, or otlp to send metricsNeeds a key with Metrics; set OTEL_METRIC_EXPORT_INTERVAL=60000 with it

Identity#

VariableValueNotes
OTEL_SERVICE_NAMEYour service's nameShown in Traces, Logs and the Connection tab
OTEL_RESOURCE_ATTRIBUTESdeployment.environment.name=productionComma-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#

VariableValueNotes
OTEL_TRACES_SAMPLERparentbased_traceidratioFollows the caller's decision; see Sampling and cost
OTEL_TRACES_SAMPLER_ARG0.1 … 1Share of new traces kept
OTEL_PROPAGATORSDefault (tracecontext,baggage)W3C Trace Context, the same headers the Belvador SDK sends

Batching#

VariableDefaultWhen to change
OTEL_BSP_SCHEDULE_DELAY, OTEL_BLRP_SCHEDULE_DELAY5000 ms (traces), 1000 ms (logs)Lower for short-lived processes
OTEL_BSP_MAX_EXPORT_BATCH_SIZE, OTEL_BLRP_MAX_EXPORT_BATCH_SIZE512Lower if requests hit 413 (over 4 MiB)
OTEL_BSP_MAX_QUEUE_SIZE, OTEL_BLRP_MAX_QUEUE_SIZE2048Raise 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#

VariableRuntimeWhy the recipe sets it
OTEL_SEMCONV_STABILITY_OPT_IN=httpNode.js, PythonStable HTTP attribute names (url.path, http.request.method, http.response.status_code)
OTEL_NODE_RESOURCE_DETECTORS=env,host,osNode.jsLeaves out the process detector, which copies the command line into every span
OTEL_NODE_DISABLED_INSTRUMENTATIONSNode.jsComma-separated instrumentations to skip (fs,dns,net)
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=truePythonSends logging records
OTEL_PYTHON_DISABLED_INSTRUMENTATIONSPythonComma-separated instrumentations to skip
OTEL_DENO=trueDenoTurns on the built-in exporter
JAVA_TOOL_OPTIONS=-javaagent:…JavaAttaches the agent where you cannot change the start command

Spotted something wrong or missing? Tell us: hello@belvador.dev