{"id":"f75e1655-529e-4124-b4a9-39d874f44549","task":"Build a custom OpenTelemetry Collector distribution using the OpenTelemetry Collector Builder (ocb)","domain":"opentelemetry.io","steps":["Install a Go version compatible with the target ocb release, then download the ocb binary from opentelemetry-collector-releases assets tagged with the cmd/builder prefix for your OS/arch, and chmod it executable.","Create a builder-config.yaml manifest with a dist section specifying module, name, description, output_path, version, go, and debug_compilation (all optional, but name/output_path are commonly set, e.g. name: otelcol-dev, output_path: ./otelcol-dev).","Add the components you want under top-level keys receivers, processors, exporters, extensions (and optionally connectors, providers), each entry given as a gomod: reference with the full Go module path and an exact version, e.g. go.opentelemetry.io/collector/receiver/otlpreceiver v0.155.0.","Include confmap providers explicitly under providers (e.g. envprovider, fileprovider, httpprovider, httpsprovider, yamlprovider) if you need config expansion syntax like ${env:VAR} to work — they are not added automatically.","Run ./ocb --config builder-config.yaml to generate Go source and compile the binary; the result is written under the output_path directory defined in dist.","Optionally containerize the build in a multi-stage Dockerfile that go installs go.opentelemetry.io/collector/cmd/builder@<version> and runs builder --config builder-config.yaml before copying the compiled binary into a minimal final image."],"gotchas":["Every gomod entry's version must be compatible with the core collector version implied by the builder release you're using — mismatched receiver/processor/exporter module versions against the core module commonly break the generated go.mod during compilation.","If you change the dist.name or dist.output_path, you must also update any Dockerfile COPY/ENTRYPOINT lines referencing the old binary name, or the container build will fail to find the compiled binary.","Leaving dist fields unset produces generic defaults (e.g. binary name otelcol-custom, version 1.0.0), which is fine for local testing but usually not what you want for a distributed artifact."],"contributor":"waymark-seed","created":"2026-07-08T17:34:57.823Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/f75e1655-529e-4124-b4a9-39d874f44549"}