OpenProgram Docs

OpenTelemetry export

invoke_agent openprogram one turn: tokens, cost, outcome chat <model> execute_tool <tool> OTLP Your collector Jaeger, Grafana, Langfuse, Phoenix, Datadog …
  1. invoke_agent openprogramone turn: tokens, cost, outcome; chat and execute_tool spans under it
  2. Your collectorover OTLP

Turn on

Off by default. Nothing is sent anywhere until you turn it on; then the data goes only to the collector you name. Settings apply when the worker starts.

openprogram config set telemetry.otel.enabled true
openprogram config set telemetry.otel.endpoint http://localhost:4318
openprogram restart
SettingEffect
telemetry.otel.enabledExport traces and metrics. OPENPROGRAM_ENABLE_TELEMETRY=1 also turns it on; OTEL_SDK_DISABLED=true keeps it off
telemetry.otel.endpointThe collector's base address; /v1/traces and /v1/metrics are added for HTTP. Empty: OTEL_EXPORTER_OTLP_ENDPOINT, then localhost
telemetry.otel.protocolauto, http/protobuf or grpc. auto reads OTEL_EXPORTER_OTLP_PROTOCOL, then uses http/protobuf
telemetry.otel.headersHeaders for every export, such as an Authorization header. Empty: OTEL_EXPORTER_OTLP_HEADERS
telemetry.otel.log_user_promptsAdd the prompt text to each turn
telemetry.otel.log_tool_detailsAdd tool arguments and result text to each tool call

The other standard variables work too: OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES, OTEL_METRIC_EXPORT_INTERVAL, and OTEL_TRACES_EXPORTER=none or OTEL_METRICS_EXPORTER=none to send only one of the two. The App exports over HTTP; gRPC needs a source install with the telemetry-grpc extra.

What is sent

SpanAttributes
invoke_agent openprogramSession, turn, prompt length, total tokens and cost, model and tool call counts, outcome
chat <model>Provider, model, input, output and cache tokens, cost, time to first token, outcome. A title, compaction or memory write is its own span under the turn
execute_tool <tool>Tool name, call id, duration, result length, outcome
Metric, each named openprogram. + thisLabels
token.usagetype (input, output, cache_read, cache_write), model, provider, call_kind
cost.usage (USD)model, provider, call_kind
model.request.countmodel, provider, call_kind
tool.call.count, tool.call.duration (ms)tool, outcome
turn.count, turn.duration (ms)outcome
session.count

Span names and gen_ai.* attributes follow the OpenTelemetry GenAI semantic conventions, so GenAI views in collectors read them as they are.

Prompts and tool content

Default
No prompt, reply, tool argument or tool result leaves the computer: only lengths, names, counts and timings
Opted in
Text passes through secret removal (API keys, tokens, private keys, passwords in assignments) and is cut at 64 KiB
Never
Credentials, and the export headers, which go only to the collector

Prompt text is taken from messages typed in an OpenProgram window; a turn started from a channel carries only its length.

Configuration · Troubleshooting

Last updated · 2026-11-30