Workflow: Pipeline Investigation & Processor Validation
Auditing OpenTelemetry collector configurations to prevent out-of-memory (OOM) crashes, data loss, and runaway log feedback loops.
Step 1: Inspect Collector Pipeline Topology
Fetch the runtime pipeline configuration and raw YAML from the Kubernetes cluster:
otel_get_collector(name="otel-gateway", namespace="monitoring")
The tool returns the full graph of active receivers, processors, exporters, and connectors across all enabled telemetry signals (traces, metrics, logs).
Step 2: Validate Processor Execution Sequence
Validate the processor ordering against OpenTelemetry community architecture standards:
otel_validate_k8sattributes_order(collector_name="otel-gateway", namespace="monitoring")
The Standard Golden Processor Order
To guarantee stability and correct metadata enrichment, processors must follow this sequence:
memory_limiter: MUST be first. Drops or halts data processing when collector heap usage approaches memory limits, preventing sudden OOM pod restarts.k8sattributes: Enriches spans and metrics with Pod, Namespace, Node, and ReplicaSet metadata extracted from the Kubernetes API.resourcedetection: Discovers cloud provider metadata (AWS EC2, GCP GKE, Azure VM) and host details.transform: Executes OTTL expressions to scrub sensitive PII, remove high-cardinality keys, or normalize attribute names.filter: Drops unwanted spans or healthy status codes based on expression rules.tail_sampling: Evaluates entire distributed traces before making retention decisions.batch: MUST be last (before exporters). Groups telemetry batches together to minimize network overhead and maximize throughput.
[!WARNING] Placing
batchbeforememory_limiterork8sattributescan cause memory spikes and prevents processors from operating on individual unbatched telemetry items.
Step 3: Check Filelog Receiver Safety
When running node-level log collection via DaemonSets, audit the receiver configuration to avoid critical failure modes:
otel_check_filelog_safety(collector_name="otel-daemonset", namespace="monitoring")
The tool checks 3 critical safety criteria:
- Checkpoint Storage Extension: Verifies that
storage: file_storageis enabled so log read positions survive pod restarts without re-ingesting duplicate gigabytes of historical logs. - Self-Log Exclusion: Ensures that the collector's own log files (e.g.
/var/log/pods/monitoring_otel-daemonset*) are excluded via regex to eliminate recursive log generation loops. - Container Resource Enrichment: Confirms that container names and pod namespaces are extracted accurately from the file path structure.