MATIH Platform is in active MVP development. Documentation reflects current implementation status.
19. Observability & Operations
Distributed Tracing Overview

Distributed Tracing Overview

MATIH implements distributed tracing using OpenTelemetry for instrumentation and Tempo as the trace storage backend. Traces propagate across microservice boundaries using W3C Trace Context headers, enabling end-to-end request visibility from the API gateway through the control plane and data plane services.


Subsections

PageDescription
OpenTelemetry SetupSDK installation, configuration, and auto-instrumentation
Jaeger IntegrationJaeger UI for trace visualization (alternative to Tempo)
Trace CorrelationCorrelating traces with logs and metrics
Span AnalysisAnalyzing span trees for performance bottlenecks

Architecture

+-------------------+     +-------------------+     +------------------+
| API Gateway       | --> | Control Plane     | --> | Data Plane       |
| (trace context)   |     | (trace context)   |     | (trace context)  |
+--------+----------+     +--------+----------+     +--------+---------+
         |                         |                          |
         +------------+------------+--------------------------+
                      |
              +-------v--------+
              |  OTel Collector |
              +-------+--------+
                      |
              +-------v--------+
              |     Tempo       |
              +-------+--------+
                      |
              +-------v--------+
              |    Grafana      |
              +----------------+

Trace Context Propagation

Traces are propagated between services using the W3C Trace Context standard:

HeaderDescription
traceparentTrace ID, span ID, and trace flags
tracestateVendor-specific trace data
X-Tenant-IdTenant context (custom header)