liveBook · Manning

Autoinstrumentation

As explained in Secure APIs

Autoinstrumentation is the automatic addition of telemetry instrumentation to an application without manually inserting instrumentation at each observation point.

Autoinstrumentation adds useful telemetry to an application without manually changing code at every observation point. It helps make APIs observable for anomaly detection, threat detection, debugging, and incident research. section 11.3

Observed API request

A FastAPI request to GET /books can produce an OpenTelemetry span containing trace and span identifiers, timing, HTTP method, route, URL, peer information, and status data.

How Secure APIs covers it

How deep it goes
Explains the zero-code approach and demonstrates installation and startup commands, while deferring detailed application internals.
Examples
Uses a Python FastAPI application, OpenTelemetry commands, and a GET /books span containing HTTP and timing attributes.
What it assumes
Assumes a Python and uv setup plus a runnable FastAPI application, then demonstrates the instrumentation wiring.
What you can do after
Operate OpenTelemetry autoinstrumentation for a Python API and inspect exported traces, metrics, and logs.
How it connects
Connects instrumentation with observability, telemetry, logs, metrics, traces, APIs, and OpenTelemetry.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.