otel-collector-best-practiceslisted
Install: claude install-skill air-gapped/skills
# OpenTelemetry Collector — current practice
The collector releases every two weeks with no LTS, and in 2026 it renamed
~70 components and changed several defaults. A config that looks right from
memory is often written for a collector that no longer exists. This skill
carries what changed, the defaults that silently lose or duplicate data, and
a working order for writing and verifying a config.
Facts here were checked against collector v0.165.0 (contrib v0.165.1,
2026-11-09) and Helm chart 0.180.0 (2026-11-18). For anything version-bound, check the installed
version first and the release notes of every hop since; see
`references/sources.md` for where each fact came from.
## Workflow: writing or changing a collector config
Work through these in order. Each step names the trap it prevents.
1. **Pin the version and distribution.** Read the image tag or
`otelcol --version`. Pick the distribution deliberately: `otelcol-k8s`
is the default for Kubernetes but lacks `prometheus_remote_write`,
`kafka` and `syslog` exporters; `otelcol-contrib` has ~250 components;
a custom `ocb` build is the production recommendation. Confirm every
component you use is in it (`otelcol components`), or the collector
refuses to start.
2. **Use the component names of that version.** Since v0.144–v0.162 the
canonical names are snake_case (`file_log`, `otlp_http`, `otlp_grpc`,
`k8s_attributes`, `k8s_objects`, `host_metrics`, `kubelet_stats`,
`resource_detection`, `load_balan