Instrumentation
Instrumentation is the addition or activation of mechanisms in software or systems to observe, measure, or record their behavior during execution.
Cloud Observability in Action
Instrumentation is the practice of adding software mechanisms that emit telemetry about a system’s behavior and state.
- How it is used
- Guides telemetry emission from owned code and supports observability tasks such as troubleshooting, alerting, and optimization.
- How deep it goes
- Explains signal choices, implementation examples, automation steps, routing, and costs, but defers detailed OpenTelemetry treatment.
- Examples
- Uses a Go echo service with structured logs, Prometheus metrics, OpenTelemetry traces, Grafana, Prometheus, and Jaeger.
- What you can do after
- Apply it via OpenTelemetry, Prometheus, or signal-specific libraries to emit, route, and evaluate telemetry for operational tasks.
Read how Cloud Observability in Action explains instrumentation →
Modern C
Instrumentation is the insertion of measurement-related operations into a program or execution environment.
- How it is used
- Uses instrumentation to time C loops while testing whether measurement itself distorts performance results.
- How deep it goes
- Explains compiler and runtime interference, then demonstrates repeated timing and statistical collection; does not establish a universal correction for measurement bias.
- Examples
- Shows three timestamped loops and a 20-timing sample with substantial variation.
- What you can do after
- Practice/perform repeated loop timings and assess whether measurement effects and sample variation weaken a performance claim.
Effective Platform Engineering
Instrumentation is the addition of code or integration components that emit telemetry from software during execution.
- How it is used
- Embeds telemetry in development and deployment workflows to make system behavior, changes, and failures observable.
- How deep it goes
- Explains telemetry types, contextual tracing, actionable logs, automation, and workflow integration, while deferring detailed spans to team choice.
- Examples
- Uses throttling events, deployment change logs, platform integrations, language packages, and optional detailed tracing as implementation examples.
- What you can do after
- Build telemetry into services and deployment pipelines, then use it to distinguish healthy controls from failures and trace changes.
Read how Effective Platform Engineering explains instrumentation →
Modern C, Third Edition
Instrumentation is the addition of code or mechanisms that observe or record properties of program execution.
- How it is used
- Measures C loop performance while warning that the measurement itself can change what runs.
- How deep it goes
- Explains compiler and run-time effects, then quantifies overhead through repeated timings and statistical summaries.
- Examples
- Compares three instrumented C loops and tabulates the costs of clock calls and statistical collection.
- What you can do after
- Evaluate/understand timing results by checking instrumentation overhead and whether observed differences exceed measurement variation.
Troubleshooting Java, Second Edition
Instrumentation is the insertion or activation of runtime measurement code to record program execution behavior.
- How it is used
- Deploys runtime measurement to identify wrong behavior and poorly performing code after high-level profiling reveals a suspicious execution.
- How deep it goes
- Explains instrumentation as detailed execution profiling and demonstrates its place after memory sampling, without detailing its implementation internals.
- Examples
- Uses VisualVM, project da-ch9-ex1, the /products/1000000 endpoint, and Product allocation results.
- What you can do after
- Diagnose memory-allocation behavior with VisualVM by moving from symptoms to sampled objects and instrumented execution details.
Read how Troubleshooting Java, Second Edition explains instrumentation →
Functional Programming in JavaScript
The process of inserting tracking code into software so execution behavior can be observed or measured.
- How it is used
- Measures which statements execute during unit tests to reveal untested code.
- How deep it goes
- Explains a three-phase workflow and tracker-line mechanism, but defers detailed setup to an appendix.
- Examples
- Uses Blanket.js, QUnit, script attributes, and imperative and functional showStudent tests.
- What you can do after
- Apply it via Blanket.js to collect and display JavaScript statement-coverage results.
Read how Functional Programming in JavaScript explains instrumentation →
Natural Language Processing in Action, Second Edition
Model instrumentation is the addition of observations or logging that exposes a model's internal computations during execution.
- How it is used
- Supports debugging, training monitoring, prediction explanation, and communication of model confidence.
- How deep it goes
- Provides executable metrics, logging, tensor extraction, and hidden-state inspection, stopping short of a general interpretability theory.
- Examples
- Uses epoch metrics, ranked nationality probabilities, prefix predictions, and tabulated 128-dimensional hidden states.
- What you can do after
- Diagnose model behavior by recording metrics, probabilities, intermediate outputs, and hidden states during execution.
Read how Natural Language Processing in Action, Second Edition explains instrumentation →
Logs and Telemetry
Instrumentation is the insertion or provision of code that records execution behavior and emits telemetry.
- How it is used
- Supports OpenTelemetry event creation across application, framework, logging, Kubernetes, and monitoring layers.
- How deep it goes
- Distinguishes automatic mechanisms from explicit span-boundary calls but does not detail SDK implementation or agent configuration.
- Examples
- Uses business transactions for explicit spans and Log4j2 or Go Zap plugins for OTLP log delivery.
- What you can do after
- Apply it via OpenTelemetry tooling by selecting automated layers and adding explicit calls for business-transaction span boundaries.
Google Anthos in Action
Instrumentation is the inclusion of code or integrations that emit measurements and diagnostic signals about software execution.
- How it is used
- Supports legacy-application modernization by enabling incident monitoring and investigation across distributed operating environments.
- How deep it goes
- Connects instrumentation to end-to-end observability but does not specify signal types, implementation steps, or configuration.
- Examples
- Uses VM-to-container migration and monitoring across large node sets as operational contexts.
- What you can do after
- Diagnose incidents across many nodes without relying on access to a dedicated virtual machine.
Secure APIs
Instrumentation is the practice of preparing software to emit telemetry and collecting that telemetry for analysis.
- How it is used
- Makes APIs observable so telemetry can reveal operational issues, anomalies, and threats.
- How deep it goes
- Explains manual logging, built-in signals, and zero-code instrumentation, then demonstrates OTel output without detailing telemetry storage or processing.
- Examples
- Uses database-query logs, web-framework request logs, and an OTel-instrumented FastAPI GET /books span.
- What you can do after
- Operate OTel autoinstrumentation for a Python FastAPI application and inspect exported traces, metrics, and logs.
Code Like a Pro in Rust
tracing is a Rust library for instrumenting programs and emitting structured diagnostic telemetry.
- How it is used
- Instruments Tokio-based async applications to measure performance, debug behavior, and emit structured telemetry.
- How deep it goes
- Explains subscribers, function instrumentation, filtering, and console setup, but does not detail tracing internals.
- Examples
- Demonstrates instrumented sleep tasks, tokio-console views, and an API service initializer using RUST_LOG and EnvFilter.
- What you can do after
- Diagnose async behavior with tokio-console and configure persistent trace output through logs or OpenTelemetry.
Fast Python: High performance techniques for large datasets
- How it is used
- Uses line-tracing instrumentation to locate performance bottlenecks in Python and Cython code.
- How deep it goes
- Configures Cython line tracing and discusses measurement overhead, but leaves compiler macros and build infrastructure unexplained.
- Examples
- Profiles image-processing code to expose a costly pixel lookup and applies line_profiler to a distance function.
- What you can do after
- Diagnose line-level performance bottlenecks with line_profiler while accounting for instrumentation overhead.
Read how Fast Python: High performance techniques for large datasets explains instrumentation →
Effective Conversational AI
Instrumentation is the deliberate collection and storage of operational data points from a software interaction for later analysis or processing.
- How it is used
- Uses operational conversation data to identify opt-out patterns, improve dialogue flows, and prepare information for later summaries.
- How deep it goes
- Explains flow markers, step tracking, context variables, and privacy boundaries, but defers platform-specific storage implementation.
- Examples
- Uses task-flow breadcrumbs, exact opt-out steps, address collection trends, and identifiers such as claim, order, or account IDs.
- What you can do after
- Operate/configure instrumentation by marking dialogue milestones, storing meaningful responses, and examining patterns for targeted improvements.
Read how Effective Conversational AI explains instrumentation →
Related concepts
- telemetryproduces · Telemetry is automatically generated or collected operational data describing a system’s activity, state, behavior, or performance.
- OpenTelemetryuses · OpenTelemetry is an open, vendor-neutral observability standard and framework for instrumenting software and generating, collecting, and exporting telemetry such as traces, metrics, and logs.
- trajectoryproduces · A trajectory is an ordered sequence of states, actions, events, or operations that records or describes progression through successive steps or over time.
- monitoringproduces · Monitoring is the ongoing observation and measurement of a system’s behavior, state, or operational signals to assess its condition and detect changes or problems.
- signalproduces · A signal is an observable value, event, or pattern that conveys information about a condition, state, or phenomenon.
- Prometheus client libraryused by · A Prometheus client library is a language-specific library for defining, collecting, and exposing application metrics in a format Prometheus can collect.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.












