Glossary · 6 · SDK interoperation
Instrumentation (software)
Also known as: Software instrumentation, Code instrumentation, Telemetry instrumentation
In software engineering, instrumentation is the addition of code, libraries or agents to software so that its components emit telemetry, such as traces, metrics and logs, about what they are doing; it is added either in the code itself (code-based or manual instrumentation) or from outside without changing the code (zero-code or automatic instrumentation).
- SDK interoperation
- Observability
In one sentence
Instrumentation adds code or agents to software so it emits traces, metrics and logs; it is code-based (manual) or zero-code (automatic).
Example
An operations team attaches a zero-code agent to a Java service to trace its HTTP and database calls, while developers add a span by hand around the pricing calculation they want to see in detail.
How it applies
- Scope of this entry: This entry covers instrumentation of software. In process automation, "instrumentation" means the measuring and control devices of a plant (transmitters, sensors, valves); that sense is not covered here.
- Observability: OpenTelemetry states that for a system to be observable it must be instrumented, so that code from the system's components emits signals such as traces, metrics and logs. Distributed tracing depends on every service along a request being instrumented and passing on the trace context.
- Code-based vs. zero-code: Code-based instrumentation uses an API and SDK in the application code and gives the deepest insight into the application's own logic. Zero-code instrumentation adds the API and SDK capabilities from outside, typically as an agent, through mechanisms such as bytecode manipulation, monkey patching or eBPF; it mainly covers the libraries in use (requests, database calls, message queues) and not the application's own code. Both can be used together.
- Developer SDKs: Client libraries and frameworks increasingly ship instrumentation built on a vendor-neutral API, so that applications get telemetry without adding it themselves. Libraries depend only on the API; the application chooses the SDK and exporter.
- Platform and hardware SDKs: Host applications instrument extension calls; device kits instrument firmware with counters and trace points, under tight limits on memory and timing.
- Documentation: Document which telemetry a component emits (names, attributes, units), how instrumentation is switched on and off, its overhead and which personal or confidential data may appear in it. Telemetry is not a substitute for logging requirements set elsewhere.
Instrumentation vs. telemetry
Instrumentation is what is added to the software. Telemetry is the data it produces and transmits. A system can be instrumented and still send no telemetry if no exporter or collector is configured.
External references
- OpenTelemetry: Instrumentation
- OpenTelemetry: Zero-code instrumentation