nodemethod
ObservabilityIntermediate

Telemetry pipeline with OpenTelemetry collectors

Agents on every host and a central gateway tier collect logs, metrics and traces in one consistent format.

OpenTelemetry gives you one standard for traces, metrics and logs. The Collector receives telemetry, processes it and exports it to one or more backends. A common production layout runs a lightweight agent on every node (or as a sidecar) and a horizontally scaled gateway tier that batches, samples, enriches and routes data. Changing backends then means changing collector configuration, not application code.

NODESGATEWAY TIEROTLPOTLP/gRPCOTLP/gRPCAPPApp + SDKOTLP → localhostOTELCollector agenthost metrics, logsOTELCollector agentkubelet, filelogHUBCollector gatewaybatch, sample, enrichDBMetrics storeDBTrace storeNMNodeMethodanalysis
traffictunnel / replicationblocked

When to use it

  • Any estate with more than a few services
  • Moving between observability vendors
  • Needing consistent resource attributes (service, environment, region) on all signals

When to avoid it

  • Pointing every SDK at a vendor directly: you lose central control over sampling, cost and data handling

How traffic flows

  1. Applications export traces, metrics and logs over OTLP to the local agent; logs written to stdout are read by the agent's filelog receiver.
  2. Agents add host and Kubernetes attributes and forward to the gateway over OTLP/gRPC.
  3. Gateways apply memory limits, batching, tail-based sampling and redaction, then fan out to each backend.
  4. Each pipeline is defined per signal type: a receiver, a chain of processors, one or more exporters.

Configuration examples

receivers:
  otlp:
    protocols:
      grpc: { endpoint: 0.0.0.0:4317 }

processors:
  memory_limiter: { check_interval: 1s, limit_percentage: 80, spike_limit_percentage: 20 }
  batch: { send_batch_size: 8192, timeout: 5s }
  attributes/redact:
    actions:
    - { key: http.request.header.authorization, action: delete }
    - { key: user.email, action: hash }
  tail_sampling:
    decision_wait: 10s
    policies:
    - { name: errors, type: status_code, status_code: { status_codes: [ERROR] } }
    - { name: slow,   type: latency,     latency: { threshold_ms: 1000 } }
    - { name: rest,   type: probabilistic, probabilistic: { sampling_percentage: 10 } }

exporters:
  otlp/metrics: { endpoint: metrics.internal:4317 }
  otlp/traces:  { endpoint: traces.internal:4317 }

service:
  pipelines:
    traces:
      receivers:  [otlp]
      processors: [memory_limiter, attributes/redact, tail_sampling, batch]
      exporters:  [otlp/traces]
    metrics:
      receivers:  [otlp]
      processors: [memory_limiter, batch]
      exporters:  [otlp/metrics]

Examples are starting points. Review provider limits, names and versions for your environment before applying.

What to monitor

SignalWhy it matters
Collector refused and dropped data pointsTelemetry loss during an incident is when you need it most.
Exporter queue size and send failuresA backend slowdown fills queues and eventually drops data.
Collector memory and CPUThe memory limiter protects the process; frequent triggering means it is undersized.
Cardinality of metric labelsOne unbounded label (like a user ID) can multiply storage cost.

Common failure modes

Tail sampling on the agents

Spans of one trace land on different agents, so sampling decisions are inconsistent.

Lens reports broken traces and recommends sampling at a load-balanced gateway tier.

Secrets in telemetry

Authorization headers end up in trace attributes.

Sentinel scans telemetry for secret patterns and recommends redaction rules.

Checklist

0 of 5 done
Was this pattern useful?

Run this pattern with NodeMethod watching it.

NodeMethod is onboarding early-access teams now. Tell us about your environment and we will be in touch.

esc
↑↓ to move↵ to open