Instrumentation is the code or agents added to an application so that it emits telemetry such as logs, metrics and traces. It can be automatic, where an agent or library hooks into common frameworks and records requests and database calls without code changes, or manual, where developers add measurements and spans in the code at points that matter.

Automatic instrumentation gives broad coverage quickly, while manual instrumentation captures business context that tools cannot guess, such as which customer plan a request belongs to or which step of a workflow failed. Most teams use both.

Instrumentation has side effects. It adds some overhead to the application, and the volume of data it creates drives telemetry costs. Detailed attributes can include sensitive information, and attributes with very many distinct values can make some back ends slow and expensive. Automatic instrumentation may also miss custom code paths.

To do it well, decide first what questions you need to answer, instrument the critical paths, use consistent names for fields and services, keep sensitive data out and measure the performance impact before rolling it out widely. Review what is collected periodically and remove what is not used.