Agent skill

Otel Collector Builder

by ollygarden in ollygarden/opentelemetry-agent-skills

Build custom OpenTelemetry Collector distributions with OCB (OpenTelemetry Collector Builder).

Apache-2.0Auto-check passedDevOps & Cloud

Install Otel Collector Builder

skills CLI
$ npx skills add ollygarden/opentelemetry-agent-skills --skill otel-collector-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ollygarden/opentelemetry-agent-skills otel-collector-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ollygarden/opentelemetry-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/otel-collector-builder .claude/skills/otel-collector-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
otel-collector-builder
GitHub stars
106
Token cost
~2k tokens
SKILL.md length
656 words
Files
4 (incl. references)
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build custom OpenTelemetry Collector distributions with OCB (OpenTelemetry Collector Builder).

  • Works in 5 steps: Install OCB at the version matching your… → Write the manifest — dist: block plus… → Align versions. All core components… → …
  • Debugging a builder manifest (builder.yaml)
  • SKILL.md covers Workflow, Install, Minimal manifest and Version alignment, plus 2 more sections
  • Calls go; reaches github.com

What it does

Otel Collector Builder is an agent skill from ollygarden/opentelemetry-agent-skills. Build custom OpenTelemetry Collector distributions with OCB (OpenTelemetry Collector Builder). Use when authoring or debugging a builder manifest (builder.yaml), choosing component and provider versions, building a collector that bundles a custom or out-of-distribution component, setting up CI or Docker builds of a distribution, or troubleshooting OCB build failures. Triggers on "ocb", "collector builder", "custom collector distribution", "builder manifest", "builder-config", and version-mismatch errors from OCB…

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/manifest.md`, `references/troubleshooting.md` and `references/workflows.md`).

It sits in DevOps & Cloud, covering Observability and Containers. It works with OpenTelemetry and Docker. The repository describes itself as: Vendor-neutral OpenTelemetry skills for AI coding agents like Claude Code, Cursor, and Codex, grounded in upstream sources. The licence is Apache-2.0.

When your agent uses it

  • Debugging a builder manifest (builder.yaml)
  • Choosing component and provider versions
  • Building a collector that bundles a custom
  • Out-of-distribution component

Example prompts

  • “collector builder”
  • “custom collector distribution”
  • “builder manifest”
  • “/otel-collector-builder”

Requirements

  • Docker

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Install OCB at the version matching your target Collector version (see Install).
  2. Write the manifest — dist: block plus component lists. Start from the minimal manifest; full key reference in references/manifest.md.
  3. Align versions. All core components share one v0.x.0 version, contrib components use the same v0.x.0, and confmap providers use the paired…
  4. Build with ocb --config=builder.yaml (binary is named builder when installed via go install). CI, Docker, multi-arch, and local-component…
  5. Verify: run ./dist/ validate --config=.yaml, then start it and send test data (otel-telemetrygen skill). If the build fails, see…

What it can do on your machine

Read from SKILL.md and the folder at commit 9900032. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Otel Collector Builder loads about 2k tokens when it runs, and up to ~6.7k if it reads all its reference files. Until then it costs about 137 tokens; SKILL.md has 656 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~137
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ollygarden/opentelemetry-agent-skills at commit 9900032, republished under its Apache-2.0 licence (© ollygarden). 656 words, ~1,966 tokens.

Download SKILL.mdSave it as .claude/skills/otel-collector-builder/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
otel-collector-builder
description
Build custom OpenTelemetry Collector distributions with OCB (OpenTelemetry Collector Builder). Use when authoring or debugging a builder manifest (builder.yaml), choosing component and provider versions, building a collector that bundles a custom or out-of-distribution component, setting up CI or Docker builds of a distribution, or troubleshooting OCB build failures. Triggers on "ocb", "collector builder", "custom collector distribution", "builder manifest", "builder-config", and version-mismatch errors from OCB builds.

OpenTelemetry Collector Builder (OCB)

OCB generates and compiles a custom Collector binary from a YAML manifest that lists exactly the components to include. Source of truth: cmd/builder in opentelemetry-collector.

Use OCB when the stock otelcol/otelcol-contrib distributions don't fit: you need a component that ships in no distribution, a private/local component, or a slimmer binary with only the components you run.

This skill covers building the distribution. For configuring individual components, see otel-collector; for writing a new component, see the component-authoring guidance; for generating test traffic against the built binary, see otel-telemetrygen.

Workflow

  1. Install OCB at the version matching your target Collector version (see Install).
  2. Write the manifest — dist: block plus component lists. Start from the minimal manifest; full key reference in references/manifest.md.
  3. Align versions. All core components share one v0.x.0 version, contrib components use the same v0.x.0, and confmap providers use the paired stable v1.y.0. Getting this wrong is the #1 build failure — see Version alignment.
  4. Build with ocb --config=builder.yaml (binary is named builder when installed via go install). CI, Docker, multi-arch, and local-component workflows are in references/workflows.md.
  5. Verify: run ./dist/<name> validate --config=<collector-config>.yaml, then start it and send test data (otel-telemetrygen skill). If the build fails, see references/troubleshooting.md.

Install

Pick the OCB version equal to the Collector core version you're targeting.

bash
# Release binary (named ocb): https://github.com/open-telemetry/opentelemetry-collector-releases/releases?q=cmd/builder
# Go install (binary is named `builder`, not `ocb`):
go install go.opentelemetry.io/collector/cmd/builder@v0.162.0

The commands below use ocb, the release-archive binary name. If you install with go install, invoke the same commands as builder ... instead.

ocb init (experimental) scaffolds a new distribution repo — manifest, Makefile, sample config, README — in --path (default .).

Minimal manifest

yaml
# builder.yaml
dist:
  name: otelcol-custom
  description: Custom OpenTelemetry Collector distribution
  output_path: ./dist
  version: 1.0.0

receivers:
  - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.162.0

processors:
  - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.162.0

exporters:
  - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.162.0
  - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.162.0

providers:
  - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.68.0
  - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.68.0

providers: semantics. Omitting the key entirely keeps OCB's built-in default set (env, file, http, https, yaml at the paired stable version). But setting providers: at all replaces that set. The generated Collector defaults conf_resolver.default_uri_scheme to env, so an explicit list without envprovider fails configuration validation unless you set another included provider as the default. Either omit the key, or include envprovider plus every scheme the collector's config will use.

Contrib components use the same list syntax:

yaml
processors:
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.162.0
Show full SKILL.md (324 more words)Show less

Version alignment

Three version streams exist and must be paired:

StreamModulesExample
v0.x.0OCB itself, all core components (go.opentelemetry.io/collector/...), contrib components in contrib's contrib-base module setv0.162.0
v1.y.0 (stable)confmap providers (confmap/provider/...), other 1.x modules (pdata, etc.)v1.68.0
contrib v1.x (stable)contrib modules in contrib's stable-base module set (e.g. processor/k8sattributesprocessor)v1.1.0 with v0.162.0

Rules:

  • Use the same v0.x.0 for every core and contrib component, matched to the OCB version — except contrib modules in the stable-base set of contrib's versions.yaml at the matching tag; use that set's v1.x version (the otelcol-contrib manifest of the same release shows the pairing).
  • For v0.162.0, the stable-base set is processor/k8sattributesprocessor at v1.1.0 — pin it at v1.1.0, not v0.162.0 (no such tag exists).
  • The paired provider version for a given release is authoritative in that release's embedded default manifest: https://github.com/open-telemetry/opentelemetry-collector/blob/cmd/builder/v0.162.0/cmd/builder/internal/config/default.yaml — check it rather than guessing (for v0.162.0 it is v1.68.0).
  • Versions require the v prefix (v0.162.0, not 0.162.0).
  • --skip-strict-versioning defaults to true, so mismatches surface as Go module resolution errors, not friendly OCB errors. Align versions up front instead of debugging go mod tidy output.

Build commands and flags

bash
ocb --config=builder.yaml                                  # full build: generate + go mod tidy + compile
ocb --config=builder.yaml --skip-compilation               # generate sources only (two-stage CI)
ocb --config=builder.yaml --skip-generate --skip-get-modules  # compile pre-generated sources untouched
FlagDefaultPurpose
--configembedded default manifestManifest path. With no --config, OCB builds otelcorecol, a minimal test-only distribution.
--skip-generatefalseDon't regenerate Go sources
--skip-compilationfalseGenerate sources, don't compile
--skip-get-modulesfalseDon't run go mod tidy/downloads. Since v0.154.0 also leaves go.mod unregenerated.
--skip-strict-versioningtrueSet to false to make OCB verify resolved versions against the manifest
--ldflags / --gcflags—Extra go build flags
--verbosefalseLog the underlying Go commands

Generated output in output_path: main.go, components.go, main_others.go, main_windows.go, go.mod, go.sum, and the compiled binary named dist.name. By default binaries are stripped (-s -w); set dist.debug_compilation: true for Delve-friendly builds.

Reference files

  • references/manifest.md — every manifest key: dist: fields, component spec (gomod/import/name/path), providers, replaces, excludes, conf_resolver, telemetry
  • references/workflows.md — local component development, CI two-stage builds, Docker and multi-arch builds, relationship to opentelemetry-collector-releases
  • references/troubleshooting.md — version mismatches, module conflicts, CGO, missing providers, runtime failures

© ollygarden, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/otel-collector-builder of ollygarden/opentelemetry-agent-skills.

  • SKILL.md
  • references/manifest.md
  • references/troubleshooting.md
  • references/workflows.md

Open the folder on GitHubat commit 9900032

Compare with similar skills

Otel Collector Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Otel Collector Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Otel Collector Builder this skillollygarden/opentelemetry-agent-skills106—~2kAutomated safety check: PassApache-2.0
Logfire Infrastructurepydantic/skills140—~1.8kAutomated safety check: PassMIT
Domain Cloud Nativemoeru-ai/auv1001 repos~1kAutomated safety check: PassApache-2.0
Nextjs Deploymentgiuseppe-trisciuoglio/developer-kit357—~2.3kAutomated safety check: NotesMIT
Temps Best Practicesgotempsh/temps833—~2.9kAutomated safety check: PassApache-2.0
New Pluginapache/skywalking-python219—~3.3kAutomated safety check: PassApache-2.0

Similar skills

  • Logfire Infrastructure

    pydantic/skills

    Official

    Monitor hosts, Docker containers, Kubernetes clusters, database/queue/cache servers, and cloud-provider metrics with Pydantic Logfire — no application code required.

    140 GitHub stars~1.8k tokensUpdated 10 days ago
    DevOps & CloudAuto-check passed
  • A skill your agent uses when building cloud-native apps. An agent skill from moeru-ai/auv.

    100 GitHub starsUsed in 1 repo~1k tokens
    DevOps & CloudAuto-check passed
  • Nextjs Deployment

    giuseppe-trisciuoglio/developer-kit

    Provides comprehensive patterns for deploying Next.js applications to production.

    357 GitHub stars~2.3k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Temps Best Practices

    gotempsh/temps

    Best-practices reference for preparing and instrumenting applications on Temps.

    833 GitHub stars~2.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • New Plugin

    apache/skywalking-python

    Scaffold a new SkyWalking Python instrumentation plugin with all required files (plugin code, tests, docker-compose, expected data, services)

    219 GitHub stars~3.3k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed
  • Plugin Test

    apache/skywalking-python

    Build Docker test images and run SkyWalking Python plugin/unit/e2e tests locally, mirroring the CI pipeline

    219 GitHub stars~2.3k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed

More from ollygarden/opentelemetry-agent-skills

All 20 skills in this repo
  • Otel Go

    ollygarden/opentelemetry-agent-skills

    OpenTelemetry in Go — SDK setup, API surface, breaking changes, contrib instrumentation libraries (otelhttp, otelgrpc, otelmongo), compile-time zero-code instrumentation (otelc), and performance…

    106 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Otel Ottl

    ollygarden/opentelemetry-agent-skills

    OpenTelemetry Transformation Language (OTTL) expert for writing and debugging telemetry transformations in the OpenTelemetry Collector.

    106 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Otel Profiles

    ollygarden/opentelemetry-agent-skills

    OpenTelemetry profiles signal and the eBPF profiler (otelcol-ebpf-profiler, profiling receiver).

    106 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Otel Span Events To Logs Migration

    ollygarden/opentelemetry-agent-skills

    Migrate OpenTelemetry Span Events (AddEvent, RecordException, and language equivalents) to the Logs API following the accepted OTEP 4430 migration plan.

    106 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Otel Telemetrygen

    ollygarden/opentelemetry-agent-skills

    Build safe, version-pinned telemetrygen commands for synthetic OTLP traces, metrics, and logs.

    106 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Otel Upgrade

    ollygarden/opentelemetry-agent-skills

    Assess OpenTelemetry package and Collector upgrades across ecosystems.

    106 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Categories

Questions about Otel Collector Builder

What does Otel Collector Builder do?

Build custom OpenTelemetry Collector distributions with OCB (OpenTelemetry Collector Builder). Otel Collector Builder is an agent skill from ollygarden/opentelemetry-agent-skills. Build custom OpenTelemetry Collector distributions with OCB (OpenTelemetry Collector Builder).

When should I use Otel Collector Builder?

Otel Collector Builder fits situations like: debugging a builder manifest (builder.yaml); choosing component and provider versions; building a collector that bundles a custom; out-of-distribution component.

How do I install Otel Collector Builder in Claude Code?

Run `npx skills add ollygarden/opentelemetry-agent-skills --skill otel-collector-builder -a claude-code`. Or copy the skill folder (skills/otel-collector-builder in ollygarden/opentelemetry-agent-skills) into .claude/skills/otel-collector-builder in your project. Claude Code loads it when a task matches its description.

How do I install Otel Collector Builder in Codex?

Run `npx skills add ollygarden/opentelemetry-agent-skills --skill otel-collector-builder -a codex`. Or copy the skill folder (skills/otel-collector-builder in ollygarden/opentelemetry-agent-skills) into .agents/skills/otel-collector-builder in your project. Codex loads it when a task matches its description.

Can I use Otel Collector Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ollygarden/opentelemetry-agent-skills --skill otel-collector-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/otel-collector-builder, .gemini/skills/otel-collector-builder, .github/skills/otel-collector-builder and .opencode/skills/otel-collector-builder in your project.

What does Otel Collector Builder need to run?

Going by SKILL.md and its folder, Otel Collector Builder needs the command-line tools its instructions call (go). Our summary lists: Docker.

Does Otel Collector Builder access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Otel Collector Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Otel Collector Builder use?

Otel Collector Builder is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Otel Collector Builder use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.7k tokens, read only when the agent opens those files.

What are the alternatives to Otel Collector Builder?

Skills that share tags, products or a category with Otel Collector Builder: Logfire Infrastructure (pydantic/skills, 140 stars), Domain Cloud Native (moeru-ai/auv, 100 stars), Nextjs Deployment (giuseppe-trisciuoglio/developer-kit, 357 stars) and Temps Best Practices (gotempsh/temps, 833 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Otel Collector Builder?

ollygarden (a GitHub organization) maintains it in ollygarden/opentelemetry-agent-skills, which has 106 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 11, 2026.

Source: ollygarden/opentelemetry-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.