← Glossary / 35 of 100

n. / Tracing basics

Instrumentation

Definition

Instrumentation is the code that records spans, attributes and errors from your application so they can be sent to an observability tool. Without it, nothing is traced.

In more detail

You can instrument manually, by wrapping a step in a span, or automatically, by letting a library patch your model and framework clients. Manual spans give you control over names and attributes; automatic ones give wide coverage quickly. Most teams start automatic and add manual spans around their own business logic.

Example

You wrap your retrieval function in a span called "retrieve-documents" and set the number of results as an attribute. Now every run shows how many documents were found.

Definitions are the start.

Open a real trace and watch these terms move.