Live trace export (OTLP)
By default, DataAgent saves a local OTLP JSON file when a root execution ends. See Trace files and evaluation framework integration to read files, inspect the call tree, and prepare evaluation records. Configure the live output described here only when runs from multiple processes or machines must be collected centrally; local files are still saved after enabling.
What OTLP means
OpenTelemetry (OTel) defines how observability data is collected and exchanged. OTLP, the OpenTelemetry Protocol, transports that data. DataAgent uses its trace model: one trace describes a root execution, each span describes a timed step, and parent IDs form the call tree. The protocol itself does not score business results; see the OTLP specification for the full definition.
| Output | When produced | Encoding |
|---|---|---|
| Local file | After the root execution ends and the tracer finishes settling | A complete OTLP ExportTraceServiceRequest JSON body |
| Live export | When spans end, if a receiver is configured | HTTP POST with binary Protobuf and Content-Type: application/x-protobuf |
Both outputs carry execution traces only; backend.log and tui.log still write to the local log directory as described in Troubleshooting. Consuming only local files requires no additional receiver service.
Configure your own OTLP receiver
If your collection service accepts OTLP/HTTP Protobuf traces, set its full URL in the DataAgent backend process environment, then start or restart the backend. The local URL below illustrates the configuration; it does not imply the evaluation framework already provides this endpoint:
export DATAAGENT_OTLP_TRACES_ENDPOINT='http://127.0.0.1:4318/v1/traces'
dataagent serveIf authentication is required, supply comma-separated key=value headers:
export DATAAGENT_OTLP_HEADERS='authorization=Bearer replace-with-your-token'| Setting | Rule |
|---|---|
DATAAGENT_OTLP_TRACES_ENDPOINT |
Full trace URL, used unchanged; /v1/traces is not appended. Unset means live export is disabled |
DATAAGENT_OTLP_HEADERS |
Optional headers in key=value,key2=value2 form; commas separate entries |
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT |
These standard variables alone do not enable the DataAgent exporter |
4318 is commonly used for OTLP HTTP and 4317 for gRPC. This exporter uses HTTP.
When starting Server directly, put these values in its process environment. Values from the Home .env and dataagent serve --env-file only feed configuration loading; they do not enter the process environment. Source launchers npm run start and ./deploy.sh can load the repository root .env. If TUI connects to an existing server, configure that server's process environment. See CLI and environment.
Check transport with a local Collector
When a receiver already exists, use it to verify directly. For temporary inspection, install the OpenTelemetry Collector following the official instructions and load this minimal configuration:
receivers:
otlp:
protocols:
http:
endpoint: 127.0.0.1:4318
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
exporters: [debug]This configuration prints received spans to the Collector output to check delivery; it does not evaluate them. A container receiver needs an address reachable inside the container and a separate host port mapping.
Verify and troubleshoot
- Run a short question and wait for it to finish. Confirm spans with resource
service.name=dataagentreached the receiver.OTLP live export enabledonly confirms exporter initialization. - Find the local JSON from the same run. Compare
langsmith.metadata.dataagent_trace_idandlangsmith.metadata.dataagent_run_idbetween the two outputs. The file normalizes trace IDs, parent relationships, and final error status from native runs; live data does not undergo this final reconciliation, so OTLP IDs and parent relationships can differ. - If the receiver never receives data, check the backend process environment, full URL, HTTP protocol, authentication, and network. For
OTLP_EXPORTER_INIT_ERROR, check the exporter configuration first; for delivery errors, check the backend logs and receiver records.
See correlating a request for local filenames, AG-UI run IDs, and A2A Task IDs.
Send historical files to a receiver
If your receiver accepts OTLP/HTTP JSON, upload the entire file:
curl --fail-with-body --silent --show-error \
-H 'Content-Type: application/json' \
--data-binary '@/path/to/run.json' \
http://127.0.0.1:4318/v1/tracesThe local file is JSON; live export is Protobuf. Changing Content-Type does not convert between them. A Protobuf-only receiver needs encoding conversion or forwarding through a Collector that accepts HTTP JSON. See OTLP JSON encoding.
Check the response for partial rejection, then locate the complete records by the file's Trace ID and original time range. Deduplicate imports by traceId and spanId. When combining live and historical data, correlate native run IDs so one execution is not counted twice. Uploading sends recorded telemetry; it does not rerun the Agent, invoke tools, or produce evaluation scores.