AI Test Stack
All Tutorials
Intermediate1 min readMay 10, 2025

OpenTelemetry in Node.js Applications

Add distributed tracing, metrics, and logs to your Node.js app with OpenTelemetry SDK.

Overview

Observability becomes much more useful when traces, metrics, and structured logs share the same request context.

Minimal setup

typescript
5 lines
1import { NodeSDK } from '@opentelemetry/sdk-node'
2
3const sdk = new NodeSDK()
4
5sdk.start()

Instrumentation priorities

  • inbound HTTP requests
  • database calls
  • external API requests
  • background jobs

Summary

Instrument the request path first. Start where latency and failure investigation already consume the most team time.