Observability
OpenTelemetry
Export every run, step, tool call and model call to an OTLP backend such as Langfuse.
[telemetry]
endpoint = "http://localhost:4318"
service_name = "dive"
[telemetry.resource]
"deployment.environment" = "dev"Related config.toml options
OpenTelemetry export over OTLP/HTTP.
The OTLP/HTTP endpoint. Telemetry is off without one.
Wire format.
Available options: http/protobuf, http/json
Export timeout in seconds.
The service.name resource attribute.
Headers sent with every export, such as auth.
Extra resource attributes.
Include each call's input and output (prompts, responses, tool arguments and results) in exported spans.
Export logs as well as traces.
Related environment variables
The OTLP/HTTP endpoint to export to.
Overrides telemetry.endpoint in config.toml.
The export wire format.
Overrides telemetry.protocol in config.toml.
| Value | Effect |
|---|---|
http/protobuf | Protobuf over HTTP. |
http/json | JSON over HTTP. |
Export timeout, in milliseconds.
Overrides telemetry.timeout_secs in config.toml.
Extra headers as comma-separated key=value pairs, added to the configured ones.
Overrides telemetry.headers in config.toml.
The service.name resource attribute.
Overrides telemetry.service_name in config.toml.
Send traces to Langfuse
Point endpoint at your Langfuse region's OTLP URL and authenticate with your project's API keys in headers:
[telemetry]
endpoint = "https://cloud.langfuse.com/api/public/otel"
[telemetry.headers]
Authorization = "Basic ${LANGFUSE_AUTH}"
"x-langfuse-ingestion-version" = "4"endpointis the base URL. Dive adds/v1/tracesitself. For the US region, usehttps://us.cloud.langfuse.com/api/public/otel.- Set
LANGFUSE_AUTHin your environment to the base64 encoding of<public key>:<secret key>. Header values can reference environment variables, so the keys stay out of the file. x-langfuse-ingestion-version = "4"makes traces show up in Langfuse right away instead of after a delay.
Langfuse groups the traces of one thread, or one workbench session, into a session.
What a trace contains
- One trace per run or turn; steps, tool calls and model calls as spans
- Model, token usage and cost on each model call
capture_contentincludes each call's input and output: prompts, responses, tool arguments and results. It's off unless you turn it on. Content is exported whole; settrace.clip_bytesto clip itlogsexports logs too
Dive also keeps every turn's trace with its session, whether or not telemetry is on. See Session traces.
Check it worked
- Run
dive plan runordive askand find the trace in the backend