Minimal OpenTelemetry Collector builds to reduce attack surface

A minimal Collector build includes only the receivers, processors, exporters and extensions your pipelines use, and it must be rebuilt and redeployed whenever a component or the core releases a fix.

On this page

Why a minimal OpenTelemetry Collector build reduces attack surface

A Collector distribution ships with a large catalog of receivers, processors, exporters and extensions, and every component you enable in a pipeline is code that runs with access to the telemetry passing through it and, often, the credentials needed to send that telemetry onward. The Collector is vendor-agnostic: it receives, processes and exports telemetry, and it can run as an agent beside services or as a gateway that accepts data from many sources. OpenTelemetry itself is not an observability backend, so the Collector is usually the component that holds exporter credentials for your storage and visualization tools. That makes its build contents a security decision, not only a packaging detail.

A minimal build contains only the components your pipelines actually reference. The OpenTelemetry security guidance recommends building with only the needed components through the Collector Builder, commonly run as ocb, which takes a manifest listing the modules to compile in. Teams usually need this in regulated networks where each software component must be justified in review, in environments with strict change control where every added component is another item to test and approve, and on shared gateways that serve many teams and so process data from many sources. Before you write the manifest, list every receiver, processor, exporter and extension referenced in your configuration, then confirm the stability level of each one in its component README, since the status page notes that core components have mixed stability.

Plan the build as a recurring process. Ask your implementation partner or internal team to show how the manifest is version-controlled, how a new component is reviewed before it is added, and how a rebuild is triggered when the Collector releases a fix. Confirm which release you are building against, because the Collector publishes regular releases with signed artifacts, SHA256 checksums and SBOM files, and a custom build inherits the patching burden that the official distribution would otherwise carry for you. The build steps and their verification are covered in the sections that follow.

Choosing between the core, contrib and custom distributions

This table compares the core distribution, the contrib distribution and a custom build made with the Collector builder on component coverage, review effort, patch ownership and fit. Read each row as a question to answer for your environment, and treat the custom build as the option that moves review and patching work onto your team.

Decision factorCore distributionContrib distributionCustom build with the Collector builder
Component coverageSmallest set of components maintained in the core repositoryBroadest set, including community components across many back endsOnly the components you list in the builder manifest
Review effortLowest, since the component list is short and stableHighest if you deploy it unchanged, because most components are unusedModerate, since you review only the components you chose and their dependencies
Patch ownershipUpstream project publishes releases you must adoptUpstream publishes releases you must adopt, with more components to trackYour team rebuilds and redeploys for every Collector release and component fix
Artifact checksVerify signed artifacts, SHA256 checksums and SBOM files from each releaseVerify signed artifacts, SHA256 checksums and SBOM files from each releaseVerify the builder and your own build outputs, and generate an SBOM for your binary
Attack surfaceFewer components than contrib, though not limited to your pipelineLargest set of components, so the most code to reason aboutSmallest set that matches your pipeline, if the manifest is kept tight
Best fitTeams that need only standard components and accept upstream defaultsTeams that need many community components and can restrict configurationTeams that want a reduced, reviewed binary and can run a patch cycle

Building a custom Collector with ocb step by step

This sequence turns a list of the components your pipelines really use into a reproducible Collector binary that contains nothing else. Each step ends with a check, so the final artifact can be traced back to a reviewed manifest.

  1. Inventory the components your pipelines use

    Start from the live configuration of every Collector, not from memory. The platform or observability engineer lists each receiver, processor, exporter, extension and connector referenced in every pipeline, including the ones in staging and gateway configurations. Record which signal types each component handles and who owns each pipeline. Done means every component name in every configuration file appears on one reviewed list, and any component present in the default distribution but absent from that list is marked for exclusion. Ask the vendor or your team to confirm any component you cannot place in an existing pipeline.

  2. Write the builder manifest with pinned modules

    Write the ocb manifest listing only the modules from your inventory, with the Go module path and version for each. Pin the Collector core and every component module to the same release, taking the version numbers from the OpenTelemetry Collector releases page rather than from older examples or blog posts. Set the distribution name, output path and the Go module used for the build. Done means every module line has an explicit version, no module uses a floating reference, and a reviewer can match each entry to one item on the inventory list.

  3. Build the binary from the manifest

    Run the builder against the manifest on a clean build host or container so no cached modules or local edits leak into the result. The platform engineer runs the build and keeps the build log. The build should fail loudly if a listed module cannot be resolved, which is a useful signal that a version or component name is wrong. Done means the build completes, the binary is written to the path in the manifest, and the log shows only the modules you listed when it resolves dependencies.

  4. Validate the configuration against the built components

    Run the Collector's configuration validation command with the new binary and the production configuration files. Any component referenced in a pipeline but missing from the build will be reported as unknown, so this check confirms the manifest and the configuration agree. Remove dead components from the configuration rather than adding them back to the manifest. Done means validation passes for every configuration file the binary will load, and the same configuration validates against no other build you have not reviewed.

  5. Run the build and validation in CI

    Move the build into the CI pipeline so each change to the manifest or the configuration triggers a rebuild, a validation run and a diff against the approved component list. The CI job should fail if a new module appears that was not reviewed, or if a version is not pinned. Store the build log, the manifest and the component list as artifacts tied to the commit. Done means a pull request that adds a component produces a visible diff in the component list, and the pipeline blocks merging until the change is reviewed.

  6. Confirm the binary starts with only intended components

    Start the built binary in a test environment with the production configuration and check the startup log for the component list the Collector reports. Compare that list with the approved inventory. Then confirm that no unexpected listeners open by checking the bound ports, which should match the receivers you configured and nothing else. Done means the startup output matches the reviewed component list, the open ports match the configuration, and the result is saved with the build record for later audit.

  7. Keep the custom build current

    Record the release version and the component list for each deployed binary so a vulnerability notice can be matched to the modules inside it. When a new Collector release appears, repeat the inventory and build steps rather than editing the binary by hand, and verify the release artifacts before rolling them out. Ask your build owner to confirm how security notices for the Collector and its contrib modules will reach the team. Done means every running Collector can be traced to a manifest, a version and a build record.

Removing unused components from configuration

A component compiled into a Collector binary does nothing until a pipeline references it, so the build alone does not expose anything. The risk sits in the configuration file. Receivers, extensions and processors that are defined but not wired into any pipeline still need review, still show up in every change, and can open a listening port or a diagnostic endpoint by accident when someone copies a block from an older example. The practical rule is that every block in the file should either appear in a service pipeline or be deliberately listed under service.extensions. Anything else should be deleted, not commented out, because commented blocks tend to be uncommented later during an incident.

Start with three groups: receivers, processors and extensions. Remove receivers for protocols no client sends, such as an OTLP gRPC receiver left over from a test. Review extensions with particular care. Health check, debug and profiling extensions are useful, but each one that is enabled is a surface someone must bind, authenticate and monitor. Keep only the extensions your operations team uses, and document which one serves which purpose. For processors, remove any that no pipeline lists, and confirm that the names in each pipeline match the names defined above it, because a mismatch can silently leave a processor out of the chain. Binding decisions for the endpoints you keep are covered in the network exposure topic. Since Collector v0.110.0, server components bind to localhost by default, but you still need to confirm that each retained endpoint is intentionally bound where you expect.

Verify that the running configuration matches the intended pipelines rather than trusting the file on disk. The otelcol validate command checks a configuration before rollout, and the Collector's own telemetry and debug output show which components started. Compare the component list in the rendered configuration against an approved inventory kept in version control, and treat any difference as a change that needs review. Confirm with your Collector team which version of the configuration schema they target, since component names and stability levels vary and are documented in each component's README in the Collector configuration docs. Make the inventory check part of your release pipeline so that a new block cannot reach production unnoticed.

Component stability and what it means for your build

A Collector build is only as small and safe as the components you choose to include. Stability levels, experimental components, credential-handling extensions and log SDK maturity each change what belongs in the build and what needs review before it ships.

Read each component's README

Core Collector components carry mixed stability levels, and each component's README documents its level. Before adding a receiver, processor, exporter or extension to your builder manifest, open its README and record the stability it reports. A component that is marked as development or alpha may change between releases in ways that break your pipeline, so treat the README as the gate for every addition rather than relying on the component name or a tutorial snippet. Confirm the level against the version you plan to build.

OpenTelemetry status

Exclude development-stage components

Components still in development or at an early stability level expand the attack surface without a matching maturity benefit. Each one adds code paths, configuration options and dependencies that your team must patch and monitor. Keep these components out of production builds unless you have a specific need, a tested configuration and a plan for upgrades when their behavior changes. Maintain a short written list of excluded components so that a later builder change does not reintroduce them silently.

Review authenticator extensions

Authenticator extensions decide who may send telemetry to a receiver, for example through OIDC validation on an incoming connection. A misconfigured authenticator can leave a receiver open or accept tokens from the wrong issuer, while a missing one leaves the endpoint trusting any sender that can reach it. When you include an authenticator, review its issuer, audience, and claim settings, and confirm that the receiver it protects is bound to the interface you intend. Do not include authenticators you do not use.

Collector configuration docs

Handle exporters that carry credentials

Exporters send data to back ends, and many of them need API keys, bearer tokens or client certificates to do so. An exporter you include in the build is a place where those credentials are read and transmitted, so each one needs a review of how it obtains its secret and where that secret is stored. The oauth2client extension can add credentials to outgoing requests, which makes it a component to review alongside the exporters it serves. Confirm that credentials come from a managed source, not from literal values in the file.

Match receivers to log SDK maturity

Trace SDKs are stable across most languages, but log SDK maturity varies, and several languages are still in development. If your applications emit logs through an SDK at an early stage, the receiver and processing path you need may differ from the one you planned, and it may be tempting to include a broader set of receivers to cover gaps. Inventory the languages and log sources in your estate first, then include only the receivers those sources require. Confirm each language's status on the status page before you finalize the receiver list.

OpenTelemetry status

Keeping a custom Collector patched after the first build

A custom Collector build is only as safe as its last rebuild. When you assemble a Collector with the Collector Builder, you take on the patch work that the official releases otherwise carry for you: each new upstream release may fix vulnerabilities in the core or in a component you kept, and none of those fixes reach your binary until you rebuild it. Assign one named owner to watch the OpenTelemetry Collector releases stream, and put a recurring rebuild on a calendar that the owner can be held to. Treat the rebuild as operational work, not a project that ends at go-live.

Recent releases show why the cadence matters. v0.161.0 shipped on September 16, 2026, v0.162.0 on September 29, and v0.163.0 on October 16, 2026. Each rebuild should update the module versions in your builder manifest to the release you target, then run your retained pipeline tests against the new binary. Those tests should cover every receiver, processor and exporter you kept, including the components whose stability is marked as mixed in their READMEs, because a version bump can change behavior even when the build succeeds. Confirm the release notes for each component you use before you approve the upgrade, and keep the previous binary available so you can roll back.

Once the new binary passes, regenerate its SBOM so it lists the components you actually shipped, and check it against the signed artifacts and checksums published with the release. Then roll the binary out in order: gateways first, then agents, with each group watched for dropped data and restarts. Ask your team to confirm how the rebuild is triggered, who approves it, how long a patch may wait before it is applied, and where the SBOM for each deployed version is stored. Without those answers, a custom build tends to stay on the version it shipped with.

How the manifest, build and deployment fit together

The flow starts with a component inventory drawn from the running configuration, which feeds the builder manifest used by ocb. The build produces a custom Collector binary that must pass a verification gate before it leaves the build pipeline and is deployed to agents and gateways in the runtime environment. The trust boundary sits at that gate: only checked artifacts cross it. When new upstream Collector releases appear, the team reviews release notes and updates the manifest and the inventory, so the loop restarts with a smaller, current build.

Build, verification and deployment flow for a minimal Collector, with the trust boundary at the gate.

Limits to confirm in your environment before committing

A custom Collector build only shrinks your attack surface if every component your pipelines need is in it, is stable enough for your environment, and can be rebuilt and redeployed on a schedule your team can sustain. The checks below cover those limits, and each one should be confirmed against upstream documentation for your exact versions rather than assumed.

Component stability for production

Core Collector components carry mixed stability levels, and each component's README documents its own status. List every receiver, processor, exporter and extension your pipelines use, then check each one's stability level before you pin it. Components marked as development or alpha may change configuration keys between releases, which turns each upgrade into a pipeline change. Record the level you accepted for each component so reviewers can see the trade-off.

OpenTelemetry status

Backend exporters in the chosen distribution

A minimal build only includes the exporters you compile in, so confirm that the exporter for each back end you send data to exists in the distribution you plan to build from. Some back-end exporters live in the contrib repository and others have moved or been renamed. Check the exporter's README for the exact component name and supported signals. A missing exporter discovered after cutover forces an emergency rebuild, so check this before you write the builder manifest.

Collector docs

Capacity to rebuild on each release

A custom binary does not receive security fixes on its own. Each Collector release needs a rebuild with the builder, retesting of your pipelines, and a new artifact in your registry. Estimate how often your team can do that work, who owns the rebuild, and what happens when a release lands during an incident window. The release history shows releases arriving every few weeks, so a monthly rebuild cadence that cannot absorb an urgent patch will leave the build exposed.

Latest release cited
v0.163.0

Fit with your deployment method

A custom binary has to run wherever your Collectors run, whether as a Kubernetes workload, a host package or a container image. Confirm how your platform team packages and starts the binary, which user it runs as, and whether your configuration loader, health checks and extensions behave the same in the custom build. Also confirm how the Helm chart or Operator references an image you built yourself, because those tools may assume the official distribution.

Signed and verifiable build inputs

Your custom build pulls in source modules at specific versions, so the build is only as trustworthy as the inputs it uses. Confirm whether the official release process publishes signatures, checksums and SBOM files for the distribution you start from, and decide how your team verifies those before using them as a base. Also confirm that your own build produces an SBOM you can scan for vulnerable components, since the minimal build is the artifact you will actually deploy.

Collector release notes

Questions buyers ask about minimal Collector builds

What drives the cost of a custom OpenTelemetry Collector build?

The main driver is how many components you keep and how many of them need checking. Each receiver, processor, exporter and extension you include adds configuration to validate, behavior to test and a version to track. Cost also rises with the number of distributions you maintain, the number of environments the build must run in, and whether you need signing, SBOM generation and mirroring into a private registry inside your own pipeline. Ask any quote to itemize the component list, the target platforms, the build pipeline changes and the patch-handling process separately, so you can see which items are one-time and which recur.

How long does the first minimal Collector build take?

The duration depends on the component count, the number of configuration pipelines that must be traced back to each component, and the environment the build runs in. A build with a short, well-known component list in a clean CI system is far simpler than one that must pass through an existing change-control process, a private registry and several Kubernetes clusters. No duration is set here because none has been supplied for this work. Ask for a timeline that lists the discovery of components in use, the build definition, testing in a staging environment and the handover, with an agreed end point for each step.

What does our team need to provide for a custom Collector build?

You will need access to the source control repository and CI system where the build runs, a place to store and publish the built binaries or images, and a staging environment where the custom Collector can be deployed and tested. You also need named owners. One person or group should own the component list and approve changes to it, and another should own patching when a new Collector release arrives. Ask whether your team can review each component decision, since the people who know which pipelines and backends are live are the ones who can confirm what can be removed.

Can our engineers build a minimal Collector themselves using the documentation?

Yes, many teams can. The OpenTelemetry Collector documentation describes building with only the needed components using the Collector Builder, and the security guidance recommends this approach. The harder part is not the build command but deciding which components are truly unused, confirming that removing one does not break a pipeline, and keeping the list current as configurations change. Ask yourself whether you have an engineer who can own this list over time and test each removal in staging. If not, a fixed-scope engagement can set up the build and hand over the runbook.

What changes when a new Collector release arrives?

Each new release means checking the release notes for changes to components in your build, rebuilding with the new version, running your pipeline tests and then deploying through your normal rollout. Releases are published on a regular cadence; the most recent examples in the release history are v0.161.0, v0.162.0 and v0.163.0 (OpenTelemetry Collector releases). Component stability also varies, and each component's README documents it. Plan for a recurring cost in staff time or a retainer, and make sure the patching owner knows which releases to track, since a custom build inherits the responsibility for its own updates.

Does a minimal build remove the need for other Collector security controls?

No. A smaller build reduces the code that can be exploited and the configuration surface you must secure, but it does not replace network binding, authentication, encryption, redaction or secrets handling. The security best practices recommend storing configuration securely, using encryption and authentication, and using the redaction processor, and these controls apply to whatever components remain. Ask any provider to show how the minimal build is tested alongside those controls, not as a substitute for them.

How do we verify the custom build before it reaches production?

Test that each pipeline in your configuration starts with the custom binary, that every referenced component is present, and that data flows end to end through each receiver and exporter in staging. Check that unused components are not listed in the configuration, and keep the build artifact and its component list together so you can show what was deployed. Ask for the test plan and the acceptance criteria in the written scope before work starts.

How DeployOpen scopes and supports a minimal Collector build

Every DeployOpen engagement for a minimal Collector build is fixed-scope, so the component list, deliverables and timeline are agreed in writing before any work starts. For this topic, the written scope normally covers four pieces of work: a component inventory of every receiver, processor, exporter, extension and connector your pipelines reference today, the manifest and build of a custom Collector using the Collector Builder (ocb), configuration pruning that removes unused components and their settings from your files, and verification and handover. The verification step checks that the build starts, that each remaining pipeline carries data, and that nothing outside the agreed list was compiled in. The quote follows from how many pipelines, environments and Collector deployments are in scope, which is why we ask for those counts up front. Confirm with us which of these items your quote covers and which you will perform yourselves.

DeployOpen builds and runs the Collector inside your own infrastructure: your cloud accounts, data centers or air-gapped networks. The build host, container registry, signing keys and deployment pipeline stay under your control, and the handover includes the build definition, the component version record and the runbook your team needs to rebuild the Collector without us. Ask whether your vendor's or your own security team's review of the output is a separate step in the quote. DeployOpen prepares systems, configuration and evidence for compliance assessments, but we do not issue audit reports, attestations or certifications. If an auditor or certification body needs an independent view of the build, that work is performed by them, and we will say what evidence to hand over.

Ongoing patching and rebuilds are offered as a retainer, because a custom distribution only stays safe if it is rebuilt when the upstream Collector and its components change. Before you sign, ask what the retainer includes: how often we review new Collector releases, who approves a rebuild, how a rebuild is tested against your pipelines, and how fast a critical fix can be turned around. Also confirm who holds the cost of each release, since the Collector project publishes new versions on its own schedule and your team will need to know which version each environment runs. We do not publish prices or fixed timelines for retainers; the written quote states them for your scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.