Core binary footprint increased significantly between v0.158.0 and v0.159.0

Author: nozomi-gedimitrCreated Oct 1, 2026Updated Oct 1, 2026
Labelscollector-telemetry

Component(s)

service

Describe the issue you're reporting

After upgrading to the latest release for some custom collector builds, noticed that the binary size increased significantly. An investigation has pinpointed this between the v0.158.0 and v0.159.0 releases.

To demonstrate the issue, the following configuration YAML was built under these two tags:

dist:
  name: otelcol-custom
  description: Local OpenTelemetry Collector binary
  output_path: /tmp/dist

exporters:
  - gomod: go.opentelemetry.io/collector/exporter/debugexporter <tag>

receivers:
  - gomod:  go.opentelemetry.io/collector/receiver/otlpreceiver <tag>

processors:
  - gomod: go.opentelemetry.io/collector/processor/batchprocessor <tag>

Builds were done in a golang:trixie container under go version:

root@9a4974680dba:/go# go version
go version go1.27.1 linux/arm64

The resulting binary sizes were

v0.158.0 --> 26M
v0.159.0 --> 30M

By investigating deeper, it was found that most of the additional size can be attributed to package go.opentelemetry.io/contrib/otelconf which got upgraded from v0.24.0 to v0.25.0:

  • This package now has got full support for interfacing to the most popular cloud environments for fetching resource related information.
  • From what I understood, this package is used for the telemetry information that the collector emits on itself.

We are making a custom, lean build of the collector, embedding it in a resources poor environment so every MB that we can spare counts. I was wondering, would it be possible to make this diverse cloud environments support opt-in, so that they are included only when they are actually needed / used?

Thank you!

Tip

React with to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Source: open-telemetry/opentelemetry-collector