# Instrumentation

Instrumentation is the code that records what an agent does while it runs and emits that record as
telemetry. For agents, the standard is OpenTelemetry with the GenAI semantic conventions. A
framework that already emits OTel spans exports them over OTLP, via HTTP or gRPC, to any endpoint
that accepts the protocol. Other dialects, such as OpenInference and Traceloop, describe the same
events with different attribute names.

Agent telemetry has a three-level structure that follows the shape of agent execution. A session
groups everything that happened across one conversation. A trace covers one turn: a user message,
the agent's full response, and everything between. A span covers one step within the turn, an LLM
call or a tool call. Spans nest within traces, and traces group into sessions.

Instrumentation is also the point where content leaves the application. It decides what gets
emitted: which prompts, outputs, and tool arguments appear in the record, and in what form. The
telemetry downstream is whatever instrumentation chose to emit, so content decisions, including
redaction, happen here.

## Questions answered under this concept

- [Can the same OpenTelemetry traces go to more than one tool?](https://tessary.ai/answers/instrumentation/can-the-same-traces-go-to-more-than-one-tool)
- [Do agent traces have to use the OpenTelemetry GenAI attribute format?](https://tessary.ai/answers/instrumentation/do-agent-traces-have-to-use-gen-ai-format)
- [Does emitting OpenTelemetry traces slow down an agent's response?](https://tessary.ai/answers/instrumentation/does-emitting-traces-slow-down-an-agent)
- [Should agent traces export over HTTP or gRPC?](https://tessary.ai/answers/instrumentation/should-agent-traces-export-over-http-or-grpc)
- [What is agent instrumentation?](https://tessary.ai/answers/instrumentation/what-is-agent-instrumentation)
- [Who decides what content leaves an agent's traces?](https://tessary.ai/answers/instrumentation/who-decides-what-content-leaves-an-agents-traces)

---

Source: https://tessary.ai/answers/instrumentation
All concepts: https://tessary.ai/answers
From Tessary, agent reliability for AI agents in production: https://tessary.ai
