Trace structure
Each turn is one trace whose trace ID is the turn UUID:invoke_agent <name>(root span): covers the entire turn, with all opening inputs ongen_ai.input.messagesand the final answer ongen_ai.output.messages.chat <model>(client span): one span per completed model call attempt, including retries and failed attempts, with token usage, finish reason, and provider-reported cost.execute_tool <name>(internal span): one span per completed tool call, with arguments, result, and error status on failure.
spawned_by, message_from, result_from, spawned, message_to) and mirrored in the omnara.links attribute for backends that drop span links on ingestion.
Very large turns are bounded before export so every request stays within collector limits. When calls or events are clipped or omitted, the root span sets omnara.trace.truncated or omnara.trace.content_truncated to true.
Fetch a turn trace
UseGET /orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns/{turnID}/trace to fetch one turn as OTLP/JSON, ready to POST to any OTLP/HTTP endpoint that accepts JSON. Pass variant=otel, langfuse, braintrust, or langsmith to include vendor-specific attributes on top of the GenAI semantic conventions. A running turn returns the spans finished so far.
Configure exporters
Open a project’s Traces page to view its exporters, or the organization’s Traces page to see the exporters of every project you can read. Project members can view exporters; adding, editing, and deleting them requires permission to manage the project. Exporters belong to a project and are managed under/orgs/{orgID}/projects/{projectID}/otel-exporters. Create one with POST /orgs/{orgID}/projects/{projectID}/otel-exporters:
Projects
Each exporter exports turns for every agent in its project, including subagents. The response carries the exporter’sproject_id, which is fixed at creation.
A project’s exporters are additive, so a turn is sent to each of them. A project can have up to 100 active exporters, and only one active exporter per endpoint.
GET /orgs/{orgID}/projects/{projectID}/otel-exporters lists the project’s exporters ordered by created_at and id. GET /orgs/{orgID}/otel-exporters is a read-only list of the exporters in every project of the organization that you can read.
Sampling and encoding
sample_percent(0–100, default100): deterministic per-turn sampling decided once when a turn finishes, so a trace is exported whole or not at all.encoding(protobuforjson, defaultprotobuf):protobufsendsapplication/x-protobufand is accepted by all variants.jsonsendsapplication/jsonand is supported byotelandlangfuseonly (Braintrust and LangSmith requireprotobuf).
Authentication and headers
Use typed credentials (auth_kind, auth_options, and a generic credential_secret_id available to the project) for endpoint authentication:
Use
headers (up to 20 plain headers) and secret_headers (up to 20 extra headers from generic secrets available to the project) for additional headers. A header managed by auth_kind cannot also appear in headers or secret_headers.
A secret used as credential_secret_id cannot be deleted while an exporter references it. A secret used only in secret_headers can be: later exports leave that header out.
Vendor setup
- OpenTelemetry (
otel): pointendpointat your collector’s/v1/tracesURL. Supportsprotobufandjson, with whicheverauth_kindyour collector requires. - Langfuse (
langfuse): endpointhttps://cloud.langfuse.com/api/public/otel/v1/tracesfor the EU region,https://us.cloud.langfuse.com/api/public/otel/v1/tracesfor the US region, or your self-hosted URL,auth_kind: "basic",auth_options.usernameset to your Langfuse Public Key (pk-lf-...),credential_secret_idstoring your Langfuse Secret Key (sk-lf-...), and plain headerx-langfuse-ingestion-version: 4. - Braintrust (
braintrust): endpointhttps://api.braintrust.dev/otel/v1/traces,encoding: "protobuf",auth_kind: "bearer_token",credential_secret_idstoring your Braintrust API key, and plain headerx-bt-parent: project_id:<your-project-id>(orproject_name:<name>). - LangSmith (
langsmith): endpointhttps://api.smith.langchain.com/otel/v1/traces,encoding: "protobuf",auth_kind: "api_key_header",auth_options.header_name: "x-api-key", andcredential_secret_idstoring your LangSmith API key.
Delivery and retries
Each finished turn is queued once per matching, sampled exporter and sent as one OTLP/HTTPPOST request (one turn per request). Transient network failures, 401/403/404/408/429, and 5xx responses retry with exponential backoff and jitter for up to one hour, after which undelivered traces expire. Other 4xx rejections and OTLP partial-success acknowledgments are not retried. Deleting an exporter or its project drops queued turns immediately.