jobs.done metric.
What Localdev configures for you
Localdev sets these variables for every service:OTEL_EXPORTER_OTLP_PROTOCOL.
Before you start
-
Send metrics more often. SDKs export metrics every 60 seconds by default. For local work, 5 seconds is more useful:
- Link logs to traces. A log is linked to a trace when it’s written while a span is active. In Go, pass the span’s context to the logger. In Python and Node.js, auto-instrumentation does it for you.
- Flush on the way out. Localdev stops services with SIGTERM. Shut the SDK down when your service exits, so the last batch of telemetry still arrives.
Go
Tested withgo.opentelemetry.io/otel 1.47.0 and go.opentelemetry.io/contrib/bridges/otelslog 0.21.0.
Save this as main.go:
main.go
…Context logging methods (InfoContext, ErrorContext, …) with the span’s context, as above.
Python
Tested with Python 3.13,opentelemetry-sdk 1.45.2 and opentelemetry-distro 0.66b2.
Install the packages into a virtual environment:
app.py:
app.py
opentelemetry-instrument, which sets up the SDK before your code starts:
Node.js
Tested with Node.js 24.4 and@opentelemetry/auto-instrumentations-node 0.83.1.
Install the packages:
app.js:
app.js
--require in the command, and turn on the three exporters:
- The usual
NODE_OPTIONS=--require …doesn’t work: Localdev refusesNODE_OPTIONS. Put--requirein thecommandinstead. --requireis resolved from the working directory, which is the Projectfile’s directory.node_modulesmust be there.
Other languages
Any OpenTelemetry SDK works if it exports OTLP to port 4998 (gRPC) or 4999 (HTTP). Only Go, Python and Node.js have been tested. To use OTLP over HTTP, set both the protocol and the endpoint:collector.receivers, use those instead.
Traces across services
A request that goes through several services shows as one trace only if each service passes the trace context on. In Go, wrap your HTTP clients and handlers withotelhttp (go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp). In Python and Node.js, auto-instrumentation does it for the libraries it supports.
Incomplete and interrupted traces
- INCOMPLETE means the trace’s root span hasn’t arrived. Spans are sent when they end, so a long request or job shows as incomplete until it finishes. The list then shows the earliest span, marked root missing.
- INTERRUPTED means a service in the trace stopped (crashed or exited) before the trace finished. Spans it hadn’t sent yet are lost. Check the service’s Output.
Services without instrumentation
A service that doesn’t use OpenTelemetry still runs, and the UI still shows whether it’s running, stopped or crashed. It sends no logs, metrics or traces. To see what it printed, open Project → Services and select Output, or read its output files (see Files).If nothing arrives
- Wait 10 seconds. SDKs send spans and logs in batches, and metrics every 60 seconds unless you set
OTEL_METRIC_EXPORT_INTERVAL. - Check the service’s stderr under Output. Some SDKs report export errors there; others fail without a word.
- If you set
OTEL_EXPORTER_OTLP_PROTOCOLorOTEL_EXPORTER_OTLP_ENDPOINTyourself, check that they match:grpcwith port 4998, orhttp/protobufwith port 4999.

