Exporter patterns overview
Exporter configurations often follow one of three patterns depending on business needs: duplicating telemetry to multiple backends (fan-out), selecting destination based on attributes (route by attribute), or forwarding telemetry between pipelines for specialized processing (cross-pipeline forwarding).
Pattern details and placement
- Fan-out: perform duplication early in the pipeline so each downstream exporter receives the original telemetry payload. This preserves data fidelity across backends.
- Attribute-based routing: use processors such as the
routingprocessor (or exporters that support routing options) to inspect attributes and decide a destination. For traces, prefer routing bytrace_idto preserve trace coherence. - Cross-pipeline forwarding: useful when a subset of data needs enrichment, normalization, or re-sampling in another pipeline. Forwarding supports intra-Collector flows and inter-Collector networks.
Notes on routing and fan-out
- Implement fan-out early so processors that modify data (e.g., sampling, redaction) do not diverge between targets unless intentionally desired.
- Routing decisions can be implemented in processors or exporter-level routing. Confirm whether your chosen exporter preserves
trace_idwhen sharding traces. - For large-scale or multi-cluster deployments, design forwarding topologies that minimize duplication and control bandwidth — e.g., aggregate at a gateway Collector, then fan-out to long-term storage.
Diagnostics and quick fixes
Use a methodical approach to diagnose exporter failures and performance issues:
When testing resilience, run controlled outages against a canary pipeline first. This reduces risk and gives faster feedback about
queued_retry and batch sizing behavior.Best practices and configuration recommendations
- Default exporter: Prefer
OTLPas your primary exporter for portability and standardization. It’s broadly supported by vendors and integrates well with the Collector. - Vendor exporters: Use vendor-specific exporters only when they provide clear benefits (delivery guarantees, optimized auth, or performance improvements).
- Reliability: Always pair exporters with
batchandqueued_retryprocessors to smooth bursts and retry transient failures. - Fan-out placement: Duplicate telemetry early if you must deliver identical payloads to multiple backends (e.g., a primary analytics backend plus a low-cost archival store).
- Canary + debug: Maintain a
debugexporter in lower environments and validate pipeline changes with a canary pipeline before production rollout. - Load distribution: For horizontal scale or tail-based sampling, use the
load_balancingexporter to spread traffic across many backends. - Cross-pipeline/connectors: For cross-cluster or complex flows, prefer purpose-built connectors or forwarding pipelines designed for multi-cluster reliability.
Recommended processors and settings to tune
batch: Tunetimeout,send_batch_size, andsend_batch_max_sizeto balance latency and throughput.queued_retry: Configurequeue_size,retry_on_failure, and timeout values to match backend SLAs.load_balancingexporter: Choose a resolver (see below) and configure consistent hashing where trace-coherence is required.
Resolver and routing key selection
Choose resolvers and routing keys based on your deployment topology:
If you require that requests for the same
routing key always hit the same backend (e.g., stateful aggregation), use consistent hashing and ensure backend identity stability.
Backend and timeout considerations
- Tune
queued_retryand other timeouts individually per backend to reflect each destination’s SLA and performance profile. - If routing is consistent-hash based, ensure backend Collector identities are stable. In Kubernetes, run backend Collectors as a
StatefulSetso their DNS/identity remains stable across restarts and scaling. - Consider separate retry/backoff behavior for long-term storage (which may accept larger queues) versus real-time monitoring backends (which require lower latency).
Quick reference / checklist
- Start with
OTLPas default exporter. - Always use
batch+queued_retry. - Fan-out early and use attribute routing for selective delivery.
- Validate changes with a canary pipeline and
debugexporter in lower environments. - For scale and trace coherence, combine
load_balancingwith a consistent resolver and stateful backend Collectors.
Links and references
- OpenTelemetry Collector: https://opentelemetry.io/docs/collector/
- Kubernetes Concepts: https://kubernetes.io/docs/concepts/
- Best practices for instrumentation and collectors: https://opentelemetry.io/docs/