Total Observability Ecosystem

Metrics, Datadog streaming, and OpenTelemetry distributed tracing pre-configured natively inside your microservice architecture.

1. OpenTelemetry Distributed Tracing (OTel)

With multiple applications talking to each other, debugging an API timeout inside a black-box environment is devastating. GO-DUCK generated apps utilize full-stack OpenTelemetry.

Note: Traces cover the entire round trip. They begin at the otelgin Router level, propagate securely via ctx context through your Controllers and Services, and are eventually finalized by the highly optimized gorm.io/plugin/opentelemetry/tracing hook at the Database execution level.

Where to view traces?

The Go application pushes these otlptracegrpc trace chunks asynchronously out to an otel-collector container over port 4317.

# The pre-packaged docker-compose spins up a Jaeger UI node 
# Point your browser to:
http://localhost:16686

2. Datadog Integration (Log Consolidation)

If deployed to the cloud, GO-DUCK apps are compatible with Datadog's Agent endpoints immediately. Inside the application-prod.yml, flip the enabled: true config marker and supply an API key.

# Inside application.yml
go-duck:
  logging:
    datadog:
      enabled: true
      api-key: "YOUR_NATIVE_DD_AGENT_API_KEY_HERE"
      site: "datadoghq.com"
      service: "inventory-microservice"

3. System Infrastructure Metrics (Statsd)

The logger package has a sidecar implementation for Datadog's statsd. A developer can quickly drop custom logger.Count("api.hit") or logger.Histogram("db.latency") functions into their services to populate dashboard charts.