mcpField
O
otel-collector

otel-collector

github.com/dash0hqCloud & DevOps98670 installsUpdated 1w ago
Repository

About otel-collector

A configuration and deployment guide for OpenTelemetry Collector users, covering telemetry ingestion, processing, and export. It emphasizes pipeline wiring, processor order, and memory safety.

Key features

  1. 01Configure receivers, processors, and exporters
  2. 02Build pipelines by signal type
  3. 03Choose Kubernetes and other deployment methods
  4. 04Configure sampling and RED metrics
  5. 05Validate configs and inspect telemetry flow

Use cases

  1. 01Ingest OTLP telemetry from applications
  2. 02Export telemetry to Dash0
  3. 03Deploy the Collector on Kubernetes
  4. 04Generate RED metrics from traces

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dash0hq/agent-skills --skill otel-collector

After installing, type/otel-collectorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
rules/
custom-distributions.md
deployment.md
exporters.md
pipelines.md
processors.md
receivers.md
red-metrics.md
sampling.md
rules/deployment/
collector-helm-chart.md
dash0-operator.md
opentelemetry-operator.md
raw-manifests.md

Details

From the project README

OpenTelemetry Collector configuration guide

Expert guidance for configuring and deploying the OpenTelemetry Collector to receive, process, and export telemetry.

Rules

RuleDescription
receiversReceivers — OTLP, Prometheus, filelog, hostmetrics
exportersExporters — OTLP/gRPC to Dash0, debug, authentication
processorsProcessors — memory limiter, resource detection, ordering, sending queue
pipelinesPipelines — service section, per-signal configuration, connectors
deploymentDeployment — agent vs gateway patterns, deployment method selection
dash0-operatorDash0 Kubernetes Operator — automated instrumentation, Collector management, Dash0 export
collector-helm-chartCollector Helm chart — presets, modes, image selection
opentelemetry-operatorOpenTelemetry Operator — Collector CRD, auto-instrumentation, sidecar
raw-manifestsRaw Kubernetes manifests — DaemonSet, Deployment, RBAC, Docker Compose
samplingSampling — head, tail, load balancing
red-metricsRED metrics — span-derived request rate, error rate, duration histograms
custom-distributionsCustom distributions — building a stripped-down Collector binary with OCB

Key principles

  • Processor ordering matters. Place memory_limiter first in every pipeline. Enable exporter batching with sending_queue: { batch: {} } and persist the queue with file_storage instead of using the batch processor. Incorrect ordering causes memory exhaustion or data loss.
  • One pipeline per signal type. Define separate pipelines for traces, metrics, and logs. Mixing signals in a single pipeline breaks processing and causes runtime errors.
  • Every declared component must appear in a pipeline. The Collector ignores components that no pipeline references, without an error or warning, so an unwired component does nothing.
  • Consistent resource enrichment across pipelines. Apply processors that enrich resource attributes like resource_detection and k8s_attributes to every signal pipeline (traces, metrics, and logs), not just one. If one pipeline enriches telemetry with k8s.namespace.name or host.name but another does not, correlation between signals is compromised by incomplete metadata.
  • Use canonical component names. Write otlp_grpc, otlp_http, load_balancing, span_metrics, log_dedup, signal_to_metrics, k8s_attributes, and resource_detection as config keys. The older names otlp (exporter only), otlphttp, loadbalancing, spanmetrics, logdedup, signaltometrics, k8sattributes, and resourcedetection still work as deprecated aliases and log a deprecation warning at startup.
  • Run Collector v0.153.0 or later. The configs in this skill need it: load_balancing and resource_detection exist only from v0.153.0, and sending_queue.batch: {} only from v0.138.0. An older Collector rejects them at startup: unknown type for a new name, and for batch: {} either 'sending_queue' has invalid keys: batch or `batch` supports only `items` or `bytes` sizer. When you pin an image, pin the version the examples are written against, v0.163.1.
  • Memory safety is non-negotiable. Always configure memory_limiter in production. Without it, a burst of telemetry can cause the Collector to OOM and crash.

Quick start

Minimal working configuration: OTLP receiver → memory limiter → OTLP/gRPC exporter to Dash0.

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

processors:
  memory_limiter:
    check_interval: 1s
    limit_mib: 400
    spike_limit_mib: 100

exporters:
  otlp_grpc:
    endpoint: ingress.eu-west-1.aws.dash0.com:4317
    headers:
      Authorization: "Bearer ${env:DASH0_TOKEN}"
    sending_queue:
      enabled: true
      storage: file_storage
      batch: {}

extensions:
  file_storage:
    directory: /var/lib/otelcol/queue
    create_directory: true

service:
  extensions: [file_storage]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [otlp_grpc]
    metrics:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [otlp_grpc]
    logs:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [otlp_grpc]

The Collector user must be able to write to the file_storage directory; in a container, mount a persistent volume at /var/lib/otelcol.

See exporters for full authentication and queue configuration, and processors for adding resource detection.

Configuration workflow

  1. Write config — define receivers, processors, and exporters; wire them in service.pipelines.
  2. Validate locally — run otelcol validate --config=config.yaml to catch structural errors before deployment.
  3. Deploy — choose a deployment method from the deployment rule (Helm, Operator, raw manifests, or Docker Compose).
  4. Verify — add the debug exporter to a pipeline temporarily and inspect stdout to confirm telemetry is flowing; then remove it before going to production.

Quick reference

What do you need?Rule
Accept OTLP telemetry from applicationsreceivers
Scrape Prometheus endpointsreceivers
Collect log files or host metricsreceivers
Send telemetry to Dash0exporters
Configure retry, queue, or compressionexporters
Set processor orderingprocessors
Add Kubernetes or cloud metadataprocessors
Wire receivers → processors → exporterspipelines
Complete working configurationpipelines
Validate the pipeline with the debug exportercollector-helm-chart, opentelemetry-operator, raw-manifests, or dash0-operator
Deploy as DaemonSet or Deploymentraw-manifests
Deploy with Helmcollector-helm-chart
Deploy with the OTel Operatoropentelemetry-operator
Deploy with the Dash0 Operatordash0-operator
Auto-instrument applications in Kubernetesopentelemetry-operator or dash0-operator
Local development with Docker Composeraw-manifests
Reduce trace volumesampling
Keep errors and slow traces, drop the restsampling
Redact sensitive data in the pipelineprocessors
Generate RED metrics from tracesred-metrics
Build a custom Collector binarycustom-distributions

Official documentation

Comments

Markdown supported