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

# Choose a telemetry exporter

> Send bounded Agentium traces to logs, collectors, OpenTelemetry, Langfuse, or a host callback.

Instrument the execution object or its event bus, then choose where the completed trace goes. By default, capture retains lifecycle metadata and usage while omitting prompt text, tool arguments/results, response text, and error bodies.

| Exporter | Destination | Choose when |
| - | - | - |
| `ConsoleExporter` / `"console"` | Console trace tree | Inspect a local application |
| `JsonFileExporter` / `"json-file"` | Compact append-only JSONL | Retain local structured traces |
| `CallbackExporter` | Host callback | Feed an existing internal sink |
| [OTelExporter](/observability/opentelemetry) / `"otel"` | OTLP over HTTP JSON | Send directly to a compatible collector |
| [OTelBridgeExporter](/observability/opentelemetry#use-your-host-sdk) | Host-owned OTel tracer | Use your SDK's sampling, processors, or binary exporter |
| [LangfuseOTLPExporter](/observability/langfuse) / `"langfuse-otlp"` | Langfuse OTLP ingestion | Use the current Langfuse integration |
| `LangfuseExporter` / `"langfuse"` | Legacy ingestion | Maintain an explicitly compatible older integration; emits a migration diagnostic |

## Write JSONL traces

```bash theme={null}
npm install @agentium/core@4.0.0 @agentium/observability@4.0.0 openai
```

This complete example requires `OPENAI_API_KEY` and a TypeScript runner. It makes a model call and appends a metadata trace to `traces.jsonl`.

```typescript traces.ts theme={null}
import { Agent, openai } from "@agentium/core";
import { instrument, JsonFileExporter } from "@agentium/observability";

const agent = new Agent({ name: "traced-agent", model: openai(process.env.OPENAI_MODEL ?? "gpt-6-luna") });
const observation = instrument(agent, { exporters: [new JsonFileExporter({ path: "traces.jsonl" })] });
try {
  const result = await agent.run("Say hello in one sentence.");
  console.log(result.status, result.text);
} finally {
  await observation.shutdown();
  await agent.close();
}
```

## Observe a harness

Pass an `EventBus` as `HarnessRuntime.telemetry` and attach `instrumentBus(bus, options)` to observe runtime/direct model and controller calls. Keep Agent-driver instrumentation on its own bus to avoid counting a call twice. A tool event or missing trace is not evidence of whether an external effect happened; use application records for that.

## Capture and shutdown

Choosing an exporter does not opt into content. If you need content, set an explicit bounded capture/redaction policy at both instrumentation and each explicit exporter instance. See [capture policy](/observability/overview#opt-into-content-deliberately).

Export queues and retention are bounded. Slow exporters do not block the Agent's outcome; drops and export errors appear as diagnostics. Call `shutdown()` after active work settles to detach and drain within its deadline. The host still owns external providers and clients it supplied.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.