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

# Telemetry

> Add logs and traces, then choose one or multiple telemetry sinks.

Harnest uses the same logging and tracing API with ADK and LangGraph.

<CardGroup cols={2}>
  <Card title="Configure one sink" icon="arrow-right" href="/docs/harnest/runtime/telemetry/single-sink">
    Send logs and traces to one OTLP collector using environment variables.
  </Card>

  <Card title="Configure multiple sinks" icon="arrows-split-up-and-left" href="/docs/harnest/runtime/telemetry/multiple-sinks">
    Fan out signals with lifecycle-owned exporters.
  </Card>

  <Card title="Threadify" icon="diagram-project" href="/docs/harnest/runtime/telemetry/threadify">
    Link sessions to business threads and filter framework noise.
  </Card>
</CardGroup>

## Add logs and spans

```python tools/search_catalog.py theme={null}
from harnest.logging import get_logger
from harnest.tracing import span, traced

logger = get_logger("catalog").bind(component="search")


@traced("catalog.lookup", attributes={"catalog.kind": "products"})
def lookup(query: str):
    with span("catalog.rank", candidate_count=12):
        logger.info("catalog.lookup.completed", result_count=3)
        return ["one", "two", "three"]
```

Logs emitted inside a span include its trace and span IDs. Structured logs are JSON on stderr by default; trace export starts when you configure a sink.

## Data boundary

| Recorded by default                         | Not recorded by default      |
| ------------------------------------------- | ---------------------------- |
| Operation names, outcomes, and timing       | Prompts and responses        |
| Correlated failures                         | Credentials and headers      |
| Bounded playground traces in process memory | Raw session IDs and payloads |

Runtime mutations emit audit events after commit as structured logs. They reach sinks configured for logs. CLI and compiler file changes are outside this boundary.
