getpatter.call.id so you can group by call in your backend.
Enable tracing
Tracing is disabled by default. Install the optional dependency and set the env flag:init_tracing once at process start — typically from the same module that creates your Patter client:
PATTER_OTEL_ENABLED is not set, init_tracing returns False and every span becomes a no-op — zero cost when disabled.
Emitted spans
| Span name | Fires | Attributes |
|---|---|---|
getpatter.stt | One per final transcript | getpatter.stt.text_len, getpatter.stt.confidence |
getpatter.llm | One per LLM iteration (incl. tool rounds) | getpatter.llm.iteration, getpatter.llm.history_size |
getpatter.tts | One per synthesized sentence | getpatter.tts.text_len |
getpatter.tool | One per tool invocation | getpatter.tool.name, getpatter.tool.transport |
PII hygiene
Patter never exports user utterances, tool payloads, or LLM content as span attributes. Only sizes, counts, and identifiers are emitted — traces are safe to ship to a shared Jaeger / Honeycomb / Grafana Cloud instance.Shutdown
Callshutdown_tracing() during graceful shutdown to flush any pending spans:
Troubleshooting
No spans appear → confirmPATTER_OTEL_ENABLED=1 is set in the process that calls init_tracing. Quick check:
otel/opentelemetry-collector-contrib or enable the HTTP receiver in your collector config.
Tracing is currently a Python-only feature. TypeScript parity is on the roadmap.

