# Does adding agent instrumentation require changing my agent's code?

Not always. OpenTelemetry's zero-code instrumentation intercepts calls into popular libraries and frameworks at runtime, through mechanisms like bytecode manipulation or monkey-patching depending on the language, and emits spans for them without touching your application code. For an agent built on a framework or model SDK a zero-code package already covers, that gets you request and response spans for those calls for free. What it doesn't reach is logic specific to your own agent: a custom retry loop, a hand-rolled planning step, anything that isn't a call into an instrumented library. Those need a manual span added with the OpenTelemetry SDK. Most production setups end up running both: zero-code for baseline coverage across framework calls, manual spans layered on top for the parts of the agent that are actually yours.

---

Sources:
- OpenTelemetry, Zero-code instrumentation: https://opentelemetry.io/docs/concepts/instrumentation/zero-code/ (fetched 2026-08-25)

Source: https://tessary.ai/answers/instrumentation/does-adding-instrumentation-require-code-changes
More on Instrumentation: https://tessary.ai/answers/instrumentation
From Tessary, agent reliability for AI agents in production: https://tessary.ai
