Trace and Optimize a NestJS Application
This lesson shows how to find out exactly where time goes during a request in a NestJS application, using OpenTelemetry to capture the data and Honeycomb to make sense of it.
The Tools
OpenTelemetry is a set of tools, APIs, and SDKs for instrumenting an application and exporting its traces, metrics, and logs. Honeycomb takes that telemetry and turns it into a visual, queryable picture of how the application behaves under different conditions.
How It Comes Together
- Install the OpenTelemetry core package and the plugins your environment needs
- Configure OpenTelemetry providers and instrument your NestJS code
- Set up an exporter that sends trace data to Honeycomb
With tracing in place, you use the resulting data to pinpoint where requests slow down and make targeted changes that cut latency and improve throughput.