OpenTelemetry (OTel) & Jaeger

Master the art of distributed tracing to debug complex inter-service communications in real-time.

What is OpenTelemetry?

OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument, generate, collect, and export telemetry data (metrics, logs, and traces). GO-DUCK implements a "Full-Stack Tracing" strategy.

The Trace Pipeline

Trace context is automatically propagated across your entire stack:

HTTP Router (Gin)
Service/Controller
Database (GORM)

Each database query is automatically tagged with the trace_id of the incoming HTTP request. This allows you to identify exactly which REST call caused a slow SQL query.

The OTel Collector

GO-DUCK apps don't speak directly to tracing backends. Instead, they export via gRPC to an otel-collector sidecar. This collector acts as a buffer and can fan-out data to Jaeger, Datadog, or Honeycomb simultaneously.

Visualizing with Jaeger

In local development, GO-DUCK spins up a Jaeger instance. It provides a web-based UI to search and visualize your traces.

# Open Jaeger UI locally
open http://localhost:16686

External Resources