Get the latest tech news

What Are Traces and Spans in OpenTelemetry?


A comprehensive, practical guide to understanding traces and spans in OpenTelemetry—how they work, how they relate, and how to instrument real Node.js / TypeScript applications effectively for deep insight and faster debugging.

This guide walks through how traces and spans are structured, how context is propagated, how to model work properly, and how to implement everything in Node.js / TypeScript with practical patterns you can copy into production. Child spans are each stage: auth middleware, controller handler, database query, cache lookup, external API call, response serialization. Highly repetitive signals (loop iterations, per-row processing) Bulk debug dumping (use logs with trace/span IDs instead) Long-running operations (use a child span instead so you get duration)

Get the Android app

Or read this on Hacker News

Read more on:

Photo of opentelemetry

opentelemetry

Photo of traces

traces

Photo of spans

spans

Related news:

News photo

OpenTelemetry Is Great, but Who the Hell Is Going to Pay for It?

News photo

Haribo recalls sweets in the Netherlands after traces of cannabis found

News photo

Monitoring my Minecraft server with OpenTelemetry and Prometheus