Skip to content

Add Micrometer distributed tracing (OTLP / Zipkin) #2

Description

@piush365

Background

Correlation IDs are propagated through MDC and response headers, but there is no span-level distributed trace. This makes it hard to visualise the latency breakdown across Redis → Kafka → PostgreSQL for a single request.

Proposed Change

Add Micrometer Tracing with an OTLP exporter so every order request produces a complete trace.

Dependencies

<dependency>
  <groupId>io.micrometer</groupId>
  <artifactId>micrometer-tracing-bridge-otel</artifactId>
</dependency>
<dependency>
  <groupId>io.opentelemetry</groupId>
  <artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>

Config

management:
  tracing:
    sampling:
      probability: 1.0
  otlp:
    tracing:
      endpoint: http://otel-collector:4318/v1/traces

Docker Compose additions

  • OpenTelemetry Collector sidecar
  • Jaeger UI for trace visualisation

Acceptance Criteria

  • Every HTTP request produces a trace with spans for Redis, Kafka, and DB operations
  • traceId appears in log lines alongside correlationId
  • Jaeger UI added to docker-compose.yml
  • README monitoring section updated with Jaeger URL

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvementobservabilityMetrics, tracing, logging, dashboards

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions