> ## Documentation Index
> Fetch the complete documentation index at: https://docs.karta.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Observability - traces for every run

> Inspect every session in the console traces view, and export OpenTelemetry GenAI traces for each run to your own observability backend.

Every turn an agent runs produces a trace, in the same shape across every
[supported harness](/build/supported-harnesses). You can inspect traces in the
console with no setup, and route them to your own observability backend over
OTLP.

## Console traces

Every organization has a built-in traces view: a session list, and a
per-session trace at four fidelity levels (`compact`, `normal`, `detailed`,
`raw`), with tokens, cost, duration, and the models used for each session.
This requires no configuration and is the fastest way to watch an agent work
or debug a turn.

## Export to your own backend

Karta emits the OpenTelemetry GenAI semantic conventions, so the dedicated
observability backends can ingest Karta traces natively. One turn is one
trace: a root `invoke_agent` span with `chat` and `execute_tool` child spans.
Every span carries `gen_ai.conversation.id` (the Karta session id) and
`karta.*` identity attributes - organization, agent, instance, end user,
harness, and turn index - so traces join cleanly with your own data.

Exported by default (metadata only):

| Attribute group | Contents                                                                                                              |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| Operation       | `gen_ai.operation.name`, `gen_ai.conversation.id`                                                                     |
| Model           | `gen_ai.provider.name`, `gen_ai.request.model`, `gen_ai.response.finish_reasons`                                      |
| Usage           | `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`                                                             |
| Tools           | `gen_ai.tool.name` (the name, not arguments)                                                                          |
| Errors          | `error.type`                                                                                                          |
| Identity        | `karta.org_id`, `karta.agent_id`, `karta.agent_instance_id`, `karta.end_user_id`, `karta.harness`, `karta.turn.index` |

Token counts are exported; cost lives in the console and the
[usage API](/platform/usage-and-budgets).

Endpoints accept the OTLP/HTTP protocol and must satisfy:

| Requirement                | Rule                                                                                     |
| -------------------------- | ---------------------------------------------------------------------------------------- |
| Transport                  | HTTPS only                                                                               |
| Credentials                | Auth goes in headers, never in the endpoint URL; headers are stored encrypted            |
| Destinations               | Public endpoints only (private and internal addresses are rejected)                      |
| Endpoints per organization | Up to 5, with one default                                                                |
| Sampling                   | A per-endpoint sampling ratio between 0 and 1; a session is exported whole or not at all |

Backend presets exist for Langfuse, Datadog, Grafana, LangSmith, and
Braintrust, and any OTLP/HTTP-compatible collector works.

To connect an endpoint for your organization, contact
[hello@karta.sh](mailto:hello@karta.sh) with your backend and endpoint URL,
and we configure it with you.

## Content mode

Each endpoint has a content mode:

* `metadata_only` (default) - the attribute groups above; no message content,
  no tool arguments.
* `content` - adds input and output messages, tool-call arguments, and tool
  results.

Content is exported only to your organization's own endpoint, never to any
shared destination, and switching an endpoint back to `metadata_only` takes
effect within seconds.

## Verify

1. Run a turn against your agent, then check your backend: the trace appears
   with root span `invoke_agent` and `gen_ai.conversation.id` set to the
   session id.
2. On the native session stream, each turn surfaces its trace id as a
   `session.trace` event (`{"trace_id": "<32-hex>"}`), so your product can
   deep-link a conversation to its trace. See
   [streaming events](/concepts/streaming-events).
3. Cross-check the same session in the console traces view.

## Next steps

* [Audit log](/platform/audit-log) - the immutable who-did-what record, with
  API and CSV export.
* [Usage and budgets](/platform/usage-and-budgets) - per-end-user usage
  attribution and hard spend caps.
