Configure Distributed Tracing
Distributed tracing shows how requests move through API7 Gateway and backend services, helping you locate latency and failures. API7 Gateway uses the opentelemetry plugin to create spans and export them to an OTLP/HTTP endpoint, such as an OpenTelemetry Collector or a compatible observability backend.
This guide configures a local Jaeger instance for evaluation, enables tracing globally, and correlates the exported traces with access logs.
How It Works
The opentelemetry plugin uses two configuration layers:
- Plugin metadata configures the collector endpoint, request timeout, resource attributes, custom headers, batch span processor, and trace ID source for a gateway group.
- Plugin configuration selects a sampling strategy and adds span attributes. You can apply the plugin to a route, service, or global rule.
Plugin metadata must be configured before the plugin can create and export spans.