instrumentation
Code, often a library, that makes an application emit telemetry about its operations.
In more detail
Much of it is automatic, wrapping web servers, HTTP clients and database drivers, and you add manual spans around important business steps. OpenTelemetry provides instrumentation libraries for most languages.
Example
OpenTelemetry can instrument Node.js code automatically by wrapping modules as they load, one use of module loader hooks.Related terms
- OpenTelemetry — A vendor-neutral, open-source standard and set of tools for producing traces, metrics and logs and sending them to any backend.
- span — One timed operation within a trace, such as handling a request or running a query, with its start, duration and attributes.
- telemetry — The data a running system sends out about itself, such as logs, metrics and traces.
- register() — The function exported from instrumentation.ts that Next.js calls once when a new server instance starts.
- onRequestError — A function exported from instrumentation.ts, added in Next.js 15, that receives every uncaught server error with request and route details.
- client library — A library you add to your code that provides ready-made counters, histograms, spans and exporters so you do not write the plumbing yourself.
- automatic instrumentation — Telemetry a library or agent adds for you, for example by wrapping common web frameworks and HTTP clients, without you writing it.
- metric — A number measured over time, such as requests per second or error count, that shows how a system behaves in aggregate.
- observability — How well you can understand what a system is doing, and why, from the data it emits: mainly logs, metrics and traces.
Taught in
- OpenTelemetry, Container Publishing and Trimming — Modern .NET Core, C# & Enterprise Microservices
- Distributed Tracing: OpenTelemetry & Traceparent — Production Full-Stack Engineering
- Script Optimization: next/script & Lazy Third Parties — Next.js 15 & Modern App Router Architecture
- Instrumentation: OpenTelemetry & Performance Spans — Next.js 15 & Modern App Router Architecture
- Native Module Systems: ESM Loader Hooks vs CommonJS — Node.js Internals & Backend Services
- Metric Types: Summaries And Histograms — Full-Stack Observability: Metrics, Tracing & Logging
- Why A Histogram Beats An Average — Full-Stack Observability: Metrics, Tracing & Logging
- The Prometheus Exposition Format — Full-Stack Observability: Metrics, Tracing & Logging
- OpenTelemetry: The Vendor Neutral Path — Full-Stack Observability: Metrics, Tracing & Logging
- Instrumenting A Service With Client Libraries — Full-Stack Observability: Metrics, Tracing & Logging
- Bringing The Three Signals Together — Full-Stack Observability: Metrics, Tracing & Logging
- Service Level Indicators — Full-Stack Observability: Metrics, Tracing & Logging
- Service Level Objectives — Full-Stack Observability: Metrics, Tracing & Logging
- Error Budgets And Burn Rate Alerts — Full-Stack Observability: Metrics, Tracing & Logging
- Six Minutes Nobody Saw: Prometheus In One Outage — Prometheus Certified Associate (PCA) Exam Prep
- Cart Versus cart: The Data Model And What A Scrape Returns — Prometheus Certified Associate (PCA) Exam Prep
- Off By Five: What Prometheus Is Not For — Prometheus Certified Associate (PCA) Exam Prep
- The Export That Failed Quietly: Timestamp Metrics — Prometheus Certified Associate (PCA) Exam Prep
- PromQL Sprint: Ten Queries At Minute Twenty Two — Prometheus Certified Associate (PCA) Exam Prep
- Thirty Second Checkouts Nobody Saw: Client Libraries — Prometheus Certified Associate (PCA) Exam Prep
- A Database You Cannot Recompile: Exporters — Prometheus Certified Associate (PCA) Exam Prep
- Milliseconds Versus Seconds: Naming Metrics And Labels — Prometheus Certified Associate (PCA) Exam Prep
- Instrumentation Sprint: Sixteen Calls On Code And Exporters — Prometheus Certified Associate (PCA) Exam Prep
- Seventy Seven Percent, Book Now? The Full Mock — Prometheus Certified Associate (PCA) Exam Prep
- One Week, Three Objectives: Final Review — Prometheus Certified Associate (PCA) Exam Prep
- Queues, Events And Asynchronous Work — Scalable System Design & Distributed Architecture
References
- OpenTelemetry: instrumentation
- Next.js 15 docs: Instrumentation
- Next.js 15 docs: instrumentation.js
- Prometheus: instrumentation best practices