What are the agent and gateway deployment patterns for the Collector?
IntermediateConceptTracing & OpenTelemetry
Answer
- Agent: a Collector on every node (DaemonSet) or as a sidecar. Apps send to
localhost/node IP. It adds host and Kubernetes metadata (k8sattributes), collects node logs and host metrics, and offloads apps fast. - Gateway: a central, horizontally scaled Deployment behind a Service. It handles tail sampling, auth to vendors, routing, rate limiting and secrets for backends.
flowchart LR
A["App pods"] --> B["Agent (DaemonSet)"]
B --> C["Gateway (Deployment)"]
C --> D["Tempo"]
C --> E["Mimir"]
C --> F["Loki"]
Most production setups use both. Tail sampling in a gateway needs trace-ID-aware load balancing (the loadbalancing exporter) so all spans of one trace reach the same replica.
More on Tracing & OpenTelemetry
What is distributed tracing, and what are a trace, a span and a span context?BeginnerWhat fields does an OpenTelemetry span carry?BeginnerWhat are span kinds and why do they matter?IntermediateWhat does the W3C `traceparent` header look like?IntermediateWhat is baggage, and how is it different from span attributes?IntermediateWhat is OpenTelemetry and what are its main parts?Beginner