This tutorial demonstrates how to implement a fully local, cloud-free observability pipeline for AI agents using OpenTelemetry GenAI semantic conventions, Docker, and the Jaeger tracing platform.
Key Points
- Deploy a local OpenTelemetry Collector and Jaeger instance using Docker Compose with pinned image versions.
- Instrument Node.js AI agents with OpenTelemetry SDKs to capture model identifiers, token usage, and operation types.
- Use
startActiveSpanto create parent-child hierarchies for multi-step reasoning chains and complex agent flows. - Visualize trace data, latency, and token costs by building a custom React dashboard connected to the Jaeger API.
- Ensure data privacy by keeping all telemetry, prompts, and sensitive business logic within your local infrastructure.