---
name: "opentelemetry-collector-pipeline"
description: "Receive, process, and export distributed traces, metrics, and logs with OpenTelemetry Collector."
metadata:
  author: "OpenTelemetry"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "configure otel collector pipeline"
  - "setup otel tail sampling"
  - "otel memory_limiter processor"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# OpenTelemetry Collector Contrib Architecture & Pipelines

Configures OTel Collector Contrib: receivers (otlp, prometheus, filelog), processors (batch, memory_limiter, attributes, tail_sampling), exporters (otlp, prometheus, loki), and service pipeline pipelines.

## When to Invoke
Invoke this skill whenever you need to:
- configure otel collector pipeline
- setup otel tail sampling
- otel memory_limiter processor

## Execution SOP & Rules
1. Define config.yaml with receivers (otlp), processors (memory_limiter, batch, tail_sampling), and exporters.
2. Configure memory_limiter with check_interval: 1s, limit_percentage: 80, spike_limit_percentage: 20.
3. Connect components inside service: pipelines: traces: { receivers: [otlp], processors: [...], exporters: [otlp] }.
4. Validate collector configuration using otelcol-contrib validate --config=config.yaml.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
