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.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Tracing & OpenTelemetry