Skip to main content
skill CX Codex

opentelemetry · julianobarbosa — Claude Code skill: what it does, how to install

A skill that walks the agent through OpenTelemetry work: collector config, rollout to Kubernetes, pipelines for traces, metrics and logs.

MIT 135 installs ★ 17 updated 2026-10-14

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add julianobarbosa/claude-code-skills --skill opentelemetry -a claude-code
Open on GitHub

What opentelemetry does

The skill gives the agent the pieces for a collector running in a cluster: a Helm install into a monitoring namespace as a DaemonSet, a YAML skeleton with otlp receivers on 4317 and 4318, memory_limiter and batch processors, exporters to Prometheus and Loki. A k8sattributes example adds pod and namespace metadata to the telemetry.

It covers DaemonSet, Deployment and sidecar layouts and what each one suits. kubectl checks are there too, along with otelcol validate --config=config.yaml for catching a broken config before rollout.

Most useful is the gotchas list. memory_limiter has to sit ahead of batch in the pipeline, or memory pressure drops batches with no backpressure. The same list flags doubled traces when auto- and manual instrumentation run side by side, and B3 headers that never turn into W3C traceparent on their own.

What it helps with

  • wire traces, metrics and logs into one collector config
  • deploy the OTEL Collector to Kubernetes with Helm
  • tag telemetry with pod and namespace names
  • pick between DaemonSet, Deployment and sidecar
  • validate collector config before rollout

Example prompts for the agent

  • Deploy the OTEL Collector into the monitoring namespace as a daemonset and turn on host metrics.
  • Write a collector config with otlp on 4317 and 4318 and put memory_limiter before batch.
  • Why do traces break between services where some send B3 and others send W3C traceparent?

How to install opentelemetry

1Skills CLI (Vercel)

npx skills add julianobarbosa/claude-code-skills --skill opentelemetry -a claude-code

2Manually: put the files in place

~/.claude/skills/opentelemetry/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/opentelemetry/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about opentelemetry

How do I install opentelemetry in Claude Code?

Run npx skills add julianobarbosa/claude-code-skills --skill opentelemetry -a claude-code. The skill file lands at ~/.claude/skills/opentelemetry/SKILL.md.

What does the opentelemetry skill do?

It helps the agent write collector configuration and deploy it to a cluster: receivers, processors, exporters, the three deployment modes, plus commands to check the result.

Why does processor order matter in the pipeline?

With batch ahead of memory_limiter, memory pressure drops batches and nothing pushes back. The limiter has to come first.

Source text

SKILL.md · MIT
---
name: opentelemetry
description: Implement OpenTelemetry (OTEL) observability - Collector configuration, Kubernetes deployment, traces/metrics/logs pipelines, instrumentation, and troubleshooting. Use when working with OTEL Collector, telemetry pipelines, observability infrastructure, or Kubernetes monitoring.
---

# OpenTelemetry Implementation Guide

## Overview

OpenTelemetry (OTel) is a vendor-neutral observability framework for instrumenting, generating, collecting, and exporting telemetry data (traces, metrics, logs). This skill provides guidance for implementing OTEL in Kubernetes environments.

## Quick Start

### Deploy OTEL Collector on Kubernetes

```bash
# Add Helm repo
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update

# Install with basic config
helm install otel-collector open-telemetry/opentelemetry-collector \
  --namespace monitoring --create-namespace \
  --set mode=daemonset
```

### Send Test Data via OTLP

```bash
# gRPC endpoint: 4317, HTTP endpoint: 4318
curl -X POST http://otel-collector:4318/v1/traces \
  -H "Content-Type: application/json" \
  -d '{"resourceSpans":[]}'
```

## Core Concepts

**Signals**: Three types of telemetry data:

- **Traces**: Distributed request flows across services
- **Metrics**: Numerical measurements (counters, gauges, histograms)
- **Logs**: Event records with structured/unstructured data

**Collector Components**:

- **Receivers**: Accept data (OTLP, Prometheus, Jaeger, Zipkin)
- **Processors**: Transform data (batch, memory_limiter, k8sattributes)
- **Exporters**: Send data (prometheusremotewrite, loki, otlp)
- **Extensions**: Add capabilities (health_check, pprof, zpages)

## Collector Configuration

### Basic Pipeline Structure

```yaml
config:
  receivers:
    otlp:
      protocols:
        grpc:
          endpoint: ${env:MY_POD_IP}:4317
        http:
          endpoint: ${env:MY_POD_IP}:4318

  processors:
    batch:
      timeout: 10s
      send_batch_size: 1024
    memory_limiter:
      check_interval: 5s
      limit_percentage: 80
      spike_limit_percentage: 25

  exporters:
    prometheusremotewrite:
      endpoint: "http://prometheus:9090/api/v1/write"
    loki:
      endpoint: "http://loki:3100/loki/api/v1/push"

  service:
    pipelines:
      metrics:
        receivers: [otlp]
        processors: [memory_limiter, batch]
        exporters: [prometheusremotewrite]
      logs:
        receivers: [otlp]
        processors: [memory_limiter, batch]
        exporters: [loki]
      traces:
        receivers: [otlp]
        processors: [memory_limiter, batch]
        exporters: [otlp/tempo]
```

### Kubernetes Attributes Enrichment

```yaml
processors:
  k8sattributes:
    auth_type: "serviceAccount"
    passthrough: false
    filter:
      node_from_env_var: ${env:K8S_NODE_NAME}
    extract:
      metadata:
        - k8s.pod.name
        - k8s.namespace.name
        - k8s.deployment.name
        - k8s.node.name
```

## Deployment Modes

| Mode | Use Case | Pros | Cons |
|------|----------|------|------|
| DaemonSet | Node-level collection | Full coverage, host metrics | Higher resource usage |
| Deployment | Centralized gateway | Scalable, easier management | Single point of failure |
| Sidecar | Per-pod collection | Isolated, fine-grained | Resource overhead per pod |

## Common Patterns

### Development Environment

- Enable debug exporter for visibility
- Lower resource limits (250m CPU, 512Mi memory)
- Include spot instance tolerations for cost savings

### Production Environment

- Implement sampling (10-50% for traces)
- Higher batch sizes (2048-4096)
- Enable autoscaling and PodDisruptionBudget
- Use TLS for all endpoints

## Detailed References

For in-depth guidance, see:

- **Collector Configuration**: [COLLECTOR.md](references/COLLECTOR.md)
- **Kubernetes Deployment**: [KUBERNETES.md](references/KUBERNETES.md)
- **Troubleshooting**: [TROUBLESHOOTING.md](references/TROUBLESHOOTING.md)
- **Instrumentation**: [INSTRUMENTATION.md](references/INSTRUMENTATION.md)

## Validation Commands

```bash
# Check collector pods
kubectl get pods -n monitoring -l app.kubernetes.io/name=otel-collector

# View collector logs
kubectl logs -n monitoring -l app.kubernetes.io/name=otel-collector --tail=100

# Test OTLP endpoint
kubectl run test-otlp --image=curlimages/curl:latest --rm -it -- \
  curl -v http://otel-collector.monitoring:4318/v1/traces

# Validate config syntax
otelcol validate --config=config.yaml
```

## Key Helm Chart Values

```yaml
mode: "daemonset"  # or "deployment"
presets:
  logsCollection:
    enabled: true
  hostMetrics:
    enabled: true
  kubernetesAttributes:
    enabled: true
  kubeletMetrics:
    enabled: true
useGOMEMLIMIT: true
resources:
  limits:
    cpu: 500m
    memory: 1Gi
  requests:
    cpu: 100m
    memory: 256Mi
```

---

## Gotchas

- **Collector tail_sampling at end of pipeline doesn't release inflight buffer** — drop decisions made late still hold memory; OOM under load.
- **Auto-instrumentation + manual instrumentation can double-count traces** — pick one strategy per service or de-dupe explicitly via sampler.
- **Context propagation**: HTTP B3 vs W3C `traceparent` headers don't auto-convert; mixed environments silently break trace continuity.
- **OTel SDK vs Collector protocol versions**: minor version mismatches can drop attributes silently (especially semantic-convention attributes).
- **Resource detection** adds platform attributes (`cloud.account.id`, `host.id`) that bloat traces — disable when not used for routing.
- **Batch processor + memory limiter ordering**: limiter must precede batch in the pipeline or memory pressure causes batch drops without backpressure.

© julianobarbosa · MIT · julianobarbosa/claude-code-skills

Similar skills

All skills for DevOps and infrastructure →

opentelemetry by other authors comes first.

opentelemetry codewithmukesh Configures OpenTelemetry traces, metrics, and logs in .NET 10 applications using OTLP export and IMeterFactory. CX Codex +1 4,000installs opentelemetry grafana opentelemetry is a Claude Code skill that instruments services to route metrics, logs, and traces into Grafana Cloud or self-hosted Tempo, Mimir, and Loki. Triggers on OTLP setup and pipeline debugging. CX Codex +1 6,900installs opentelemetry devops-skills opentelemetry is a Claude Code skill that instruments applications and infrastructure with a unified observability model. It supports debugging microservice latency and standardizing telemetry. CX Codex +1 379installs opentelemetry Claude MPM Team opentelemetry is a Claude Code skill for configuring OpenTelemetry traces, metrics, and logs. It covers OTLP export through a Collector. CX Codex +1 655installs opentelemetry-net-instrumentation Aaronontheweb opentelemetry-net-instrumentation — a skill that guides OpenTelemetry instrumentation in .NET code: traces, metrics and logs. Useful when you add telemetry to a library or an app. CX Codex +1 442installs golang-observability-opentelemetry Claude MPM Team golang-observability-opentelemetry — a skill for Claude Code, Codex, Cursor, and other platforms that trains the agent to instrument Go services with OpenTelemetry, Prometheus, and slog. CX Codex +1 430installs 183-java-observability-tracing-opentelemetry Juan Antonio Breña Moral 183-java-observability-tracing-opentelemetry guides OpenTelemetry distributed tracing setup in Java services with context propagation and semantic attributes. CX Codex +1 253installs opentelemetry-expert 0xfurai opentelemetry-expert configures OpenTelemetry tracing, metrics, and logs while handling context propagation and sampling strategies. CX Codex ★ 1,029repo stars groundcover-cli paymog groundcover-cli — a skill that drives the groundcover Go CLI from your agent: pull logs, traces, metrics and k8s events, and manage monitors or silences. CX Codex +1 10,400installs observability-k8s-investigation elastic observability-k8s-investigation is a Claude Code skill that investigates Kubernetes faults using OTel telemetry through EDOT. It activates for pod, node, and control-plane issues. CX Codex +1 3,500installs

From the same set37

The whole set →
1password Gives the agent a working map of 1Password: pull a secret with op, feed it to your app, wire vaults into Kubernetes. CX Codex +1 172installs mkdocs This skill guides an agent through building a MkDocs documentation site from Markdown. Use it to configure pages, preview a site, or prepare a deployment. CX Codex +1 157installs loki This skill guides Grafana Loki configuration, from deployment modes and storage backends to LogQL queries. Use it while setting up Loki or investigating its configuration. CX Codex +1 148installs consulting-design consulting-design brings Gemini into your workflow to evaluate design trade-offs, review architecture, and brainstorm alternatives via MCP tools. CX Codex +1 140installs writing-python writing-python — a skill that keeps an agent on Python 3.14 idioms: standard library first, type hints on every function, uv and ruff in place of pip and black. CX Codex +1 134installs zabbix-api Hands the agent working Zabbix API calls through the zabbix_utils Python library: hosts, templates, triggers, history, trapper data. CX Codex +1 132installs shellcheck shellcheck runs static analysis on bash and sh scripts to catch quoting bugs, syntax errors, and POSIX mismatches while generating automated diff patches. CX Codex +1 129installs shell-prompt The shell-prompt skill for Claude Code provides zsh prompt configs with Powerlevel10k, vi mode, mode-specific cursor shapes, and NORMAL/INSERT indicators for tracking the current mode. CX Codex +1 125installs

Project sponsors

Companies that keep this analytics open