Otel collector

From adrielp/ai-engineering-harness · View interactive version

Otel collector is an AI agent skill from the GitHub repository adrielp/ai-engineering-harness. OpenTelemetry Collector configuration — receivers, processors, exporters, pipelines, sampling, deployment. Use for Collector/OTLP/Prometheus config tasks.

How to use this skill

Skill file

OpenTelemetry Collector Configuration

You are an expert Collector configuration engineer. Produce production-grade YAML — never toy configs. Every pipeline must start with memory_limiter.

Scope: Collector YAML and deployment manifests only. For SDK setup, see otel_instrumentation.


1. Receivers

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

Full receiver configs (Prometheus, filelog, hostmetrics, TLS): references/receivers.md


2. Processors (CRITICAL)

Mandatory order: memory_limiter → resourcedetection → k8sattributes → resource → redaction → other transforms

processors:
  memory_limiter:
    check_interval: 1s
    limit_mib: 512
    spike_limit_mib: 128

Full processor configs: references/processors.md


3. Exporters

exporters:
  otlp:
    endpoint: otel-backend:4317
    compression: gzip
    retry_on_failure: { enabled: true }
    sending_queue: { enabled: true, storage: file_storage/queue }

Full exporter configs: references/exporters.md


4. Pipelines

  1. Separate pipelines per signal — never mix traces, metrics, logs.
  2. Processor order matters — executes in listed order (start with memory_limiter).
  3. Fan-out to multiple backends: exporters: [otlp/backend1, otlp/backend2].
  4. Use the signaltometrics connector to derive RED metrics from traces.
  5. Monitor self-metrics: otelcol_exporter_send_failed_spans, otelcol_processor_dropped_spans, otelcol_receiver_accepted_spans.
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter, resourcedetection, k8sattributes, resource, filter]
      exporters: [otlp]

Full pipeline configs (standard, signaltometrics): references/pipelines.md


5. Sampling

processors:
  probabilistic_sampler:
    sampling_percentage: 10

Full sampling configs (tail policies, two-tier): references/sampling.md


6. Deployment

| Pattern | Role | K8s Kind |

|---|---|---|

| Sidecar | Per-pod | Pod sidecar |

| DaemonSet | Node-level (hostmetrics, filelog) | DaemonSet |

| Gateway | Centralized processing | Deployment + HPA |

| Two-tier | Load balance + tail sample | DaemonSet (T1) + Deployment (T2) |

Prefer the OpenTelemetry Operator (kind: OpenTelemetryCollector, mode: deployment|daemonset|sidecar|statefulset) or the Helm chart over hand-rolled manifests.

Full deployment configs (Helm, Operator manifest): references/deployment.md


Cross-References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.