Skip to content

feat(otelcol)!: Upgrade to OTel Collector v0.142.0#5128

Merged
ptodev merged 7 commits intomainfrom
ptodev/update-otel
Jan 20, 2026
Merged

feat(otelcol)!: Upgrade to OTel Collector v0.142.0#5128
ptodev merged 7 commits intomainfrom
ptodev/update-otel

Conversation

@ptodev
Copy link
Copy Markdown
Contributor

@ptodev ptodev commented Dec 16, 2025

Brief description of Pull Request

feat(beyla.ebpf): Upgrade Beyla to v2.8.5

feat(otelcol.receiver.kafka): Remove the global topic attribute

BREAKING-CHANGE: The global topic attribute has been deleted; use the topics attributes inside the logs, metrics, and traces blocks instead.

feat(otelcol.receiver.kafka): Deprecate the topic attribute inside the logs, metrics, and traces blocks in favour of a new topics attribute.

Notes to the Reviewer

I'm not including the change to otelcol.receiver.awss3 in the changelog, because that component isn't in the latest release.

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated

BEGIN_COMMIT_OVERRIDE
feat(otelcol)!: Upgrade to OTel Collector v0.142.0

feat(beyla.ebpf): Upgrade Beyla to v2.8.5

feat(otelcol.receiver.kafka): Remove the global topic attribute

BREAKING-CHANGE: The global topic attribute has been deleted; use the topics attributes inside the logs, metrics, and traces blocks instead.

feat(otelcol.receiver.kafka): Deprecate the topic attribute inside the logs, metrics, and traces blocks in favour of a new topics attribute.
END_COMMIT_OVERRIDE

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 16, 2025

💻 Deploy preview available (Upgrade to OTel Collector v0.142.0):

@ptodev ptodev force-pushed the ptodev/update-otel branch 2 times, most recently from b9bd1b0 to f2e2b8f Compare December 18, 2025 17:43
@ptodev ptodev force-pushed the ptodev/update-otel branch from 5553fbe to 31844d3 Compare January 6, 2026 09:36
@dehaansa
Copy link
Copy Markdown
Contributor

dehaansa commented Jan 9, 2026

Make sure we reference Cyrille's new function in the transform processor for fixing span name - open-telemetry/opentelemetry-collector-contrib#43145 - it should be called out in the OTel docs now, too.

@ptodev ptodev force-pushed the ptodev/update-otel branch 2 times, most recently from 9eb1636 to f4ffb42 Compare January 12, 2026 11:56
@ptodev ptodev force-pushed the ptodev/update-otel branch 3 times, most recently from 09dd52b to 33725cd Compare January 14, 2026 17:24
@ptodev ptodev marked this pull request as ready for review January 14, 2026 18:11
@ptodev ptodev requested review from a team and clayton-cornell as code owners January 14, 2026 18:11
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 14, 2026

🔍 Dependency Review

Below is a focused review of dependency upgrades that required (or will require) code changes, with references and concrete diffs to guide adoption. I’ve exhaustively checked the releases between your “as‑is” and “to‑be” versions for the major changes that impacted this codebase.

Legend:

  • ✅ Safe — No required code changes
  • ⚠️ Needs Review — Potential minor changes
  • ❌ Changes Needed — Breaking changes; code updates applied or required

go.opentelemetry.io/collector v0.139.x → v0.142.x (and companion modules) — ❌ Changes Needed

Key breaking changes applied in this PR:

  • Queue settings are now optional:
    • exporterhelper.QueueBatchConfig is now wrapped in configoptional.Optional.
    • Most exporter configs’ QueueSettings/QueueConfig fields changed from a struct to configoptional.Optional[QueueBatchConfig].
  • HTTP Cookies config changed to optional:
    • confighttp.CookiesConfig no longer uses an “enabled” field; presence indicates enablement.
  • GRPC/HTTP client/server helpers require an extension registry rather than Host for wiring auth.

Relevant upstream notes:

  • 0.140.0–0.142.0 collector releases (and 1.48.0/1.49.0 lib bumps) introduced optional config wrappers and signature changes around ToServer/ToClientConn. See:
    • Collector v0.142.0 release notes/changelog
    • exporterhelper queue optionalization PRs
    • confighttp Cookies optionalization PRs

Applied code changes:

  1. Queue settings → configoptional.Optional
  • Before:
    // exporter
    result.QueueSettings = *q
    
  • After:
    // exporter
    result.QueueSettings = q
    

Examples from this PR:

  • awss3exporter
    - result.QueueSettings = *q
    + result.QueueSettings = q
  • datadog exporter
    - QueueSettings: *q,
    + QueueSettings: q,
  • faro exporter
    - QueueConfig:  *q,
    + QueueConfig:  q,
  • googlecloud exporters
    - QueueSettings: exporterhelper.NewDefaultQueueConfig(),
    + QueueSettings: configoptional.Some(exporterhelper.NewDefaultQueueConfig()),
  • loadbalancing exporter
    - QueueSettings: *q,
    + QueueSettings: q,
  • otlp/otlphttp exporters
    - QueueConfig:  *q,
    + QueueConfig:  q,
  • splunkhec/syslog exporters
    - QueueSettings: *q,
    + QueueSettings: q,

Supporting internal helpers updated to/from configoptional:

  • Convertors and config adapters now return/accept configoptional.Optional and use GetOrInsertDefault() where needed:
    - func (args *QueueArguments) Convert() (*otelexporterhelper.QueueBatchConfig, error)
    + func (args *QueueArguments) Convert() (configoptional.Optional[otelexporterhelper.QueueBatchConfig], error)
  1. Cookies config → optional
  • Before:
    type Cookies struct {
        Enabled bool `alloy:"enabled,attr,optional"`
    }
    func (c *Cookies) Convert() otelconfighttp.CookiesConfig {
        // Enabled: c.Enabled
    }
    
  • After:
    - func (c *Cookies) Convert() otelconfighttp.CookiesConfig
    + func (c *Cookies) Convert() configoptional.Optional[otelconfighttp.CookiesConfig]
    
    + return configoptional.Some(otelconfighttp.CookiesConfig{})
    This follows the upstream “presence means enabled” pattern.
  1. ToServer/ToClientConn signatures
  • Upstream confighttp/configgrpc changed helpers to accept an extension registry rather than component.Host.
  • Applied changes in Jaeger remote sampling:
    - server, err := s.settings.ToServer(ctx, host, s.telemetry)
    + server, err := s.settings.ToServer(ctx, host.GetExtensions(), s.telemetry)
    
    - conn, err := jrse.cfg.Source.Remote.ToClientConn(ctx, host, jrse.telemetry)
    + conn, err := jrse.cfg.Source.Remote.ToClientConn(ctx, host.GetExtensions(), jrse.telemetry)

Concrete diff samples already in this PR:

  • internal/component/otelcol/config_queue.go
  • internal/component/otelcol/exporter//.go
  • internal/converter/internal/otelcolconvert/queue/ and cookies/ handling
  • internal/component/otelcol/extension/jaeger_remote_sampling/**

No further code changes required if you stay on v0.142.x.


github.com/open-telemetry/opentelemetry-collector-contrib v0.139.x → v0.142.x — ❌ Changes Needed

Primary breaking changes that affected this codebase:

  1. Kafka receiver schema updated:
  • New fields per signal block:
    • topics: list of topic names (replacing singular topic, which is deprecated)
    • exclude_topics: optional list of patterns to exclude
  • Top-level deprecated fields topic and encoding should be removed; per-signal blocks now define encoding and topics.

Applied changes:

  • Arguments struct:

    - Topic    string `alloy:"topic,attr,optional"` // Deprecated
    - Encoding string `alloy:"encoding,attr,optional"` // Deprecated
    + Logs    KafkaReceiverTopicEncodingConfig `alloy:"logs,block,optional"`
    + Metrics KafkaReceiverTopicEncodingConfig `alloy:"metrics,block,optional"`
    + Traces  KafkaReceiverTopicEncodingConfig `alloy:"traces,block,optional"`
  • Per-signal block:

    - type KafkaReceiverTopicEncodingConfig struct {
    -   Topic string `alloy:"topic,attr,optional"`
    -   Encoding string `alloy:"encoding,attr,optional"`
    - }
    + type KafkaReceiverTopicEncodingConfig struct {
    +   Topic         string   `alloy:"topic,attr,optional"`
    +   Topics        []string `alloy:"topics,attr,optional"`
    +   Encoding      string   `alloy:"encoding,attr,optional"`
    +   ExcludeTopics []string `alloy:"exclude_topics,attr,optional"`
    + }
  • Conversion updated accordingly:

    - result.Logs = args.Logs.convert(deprecated...)
    + result.Logs = kafkareceiver.TopicEncodingConfig{
    +   Topic:         args.Logs.Topic,
    +   Topics:        args.Logs.Topics,
    +   Encoding:      args.Logs.Encoding,
    +   ExcludeTopics: args.Logs.ExcludeTopics,
    + }
  • Default values now provided via blocks:

    + args.Logs = KafkaReceiverTopicEncodingConfig{Topics: []string{"otlp_logs"}, Encoding: "otlp_proto"}
    + args.Metrics = KafkaReceiverTopicEncodingConfig{Topics: []string{"otlp_metrics"}, Encoding: "otlp_proto"}
    + args.Traces = KafkaReceiverTopicEncodingConfig{Topics: []string{"otlp_spans"}, Encoding: "otlp_proto"}
  1. AWS S3 receiver changes:
  • s3_partition replaced with s3_partition_format and s3_partition_timezone (strftime style).
  • Applied change:
    - S3Partition string `alloy:"s3_partition,attr,optional"`
    + S3PartitionFormat   string `alloy:"s3_partition_format,attr,optional"`
    + S3PartitionTimezone string `alloy:"s3_partition_timezone,attr,optional"`
    And pass through in receiverConfig/ArgumentsFromConfig.
  1. Opencensus receiver removal from this distribution (deprecation in upstream):
  • The local component and docs were removed.
  • Code removed in:
    • internal/component/all/all.go
    • internal/converter/internal/otelcolconvert/converter_opencensusreceiver.go
    • tests/docs removed
  • If any config still references otelcol.receiver.opencensus, migrate to otelcol.receiver.otlp or remove.

Evidence:

  • Contrib v0.141/0.142 receivers updated; see kafka receiver PRs and awss3 partition changes in releases for 0.141/0.142.

No further code changes required.


github.com/grafana/beyla/v2 v2.7.10 → v2.8.5 — ❌ Changes Needed

Breaking API changes addressed:

  • DefaultConfig is now a function: beyla.DefaultConfig()
    - routes := beyla.DefaultConfig.Routes
    + routes := beyla.DefaultConfig().Routes
  • Imports reorganized in OBI:
    - "go.opentelemetry.io/obi/pkg/kubeflags"
    - "go.opentelemetry.io/obi/pkg/services"
    + "go.opentelemetry.io/obi/pkg/kube/kubeflags"
    + "go.opentelemetry.io/obi/pkg/appolly/services"
  • Network config type alignment:
    - func (args Network) Convert(enable bool) beyla.NetworkConfig
    + func (args Network) Convert(enable bool) obi.NetworkConfig
  • Routes config includes max_path_segment_cardinality:
    + if args.MaxPathSegmentCardinality > 0 {
    +   routes.MaxPathSegmentCardinality = args.MaxPathSegmentCardinality
    + }
  • Minor rename in Attributes/Discovery defaults (consistently through DefaultConfig()).

These changes are applied in:

  • internal/component/beyla/ebpf/*.go

References:

  • Beyla v2.8.x changelog.

go.opentelemetry.io/ebpf-profiler (replace → grafana fork) v0.0.202550… → v0.0.202602… — ❌ Changes Needed

The profiler stack (tied to otel-profiling-go) introduced changes that required code updates in the Pyroscope eBPF reporter:

  • Trace origin constants updated:
    - support.TraceOriginUProbe
    + support.TraceOriginProbe
  • Frame mapping fields consolidated under a Mapping object:
    - fr.MappingFile, fr.MappingStart, fr.MappingEnd, fr.MappingFileOffset
    + fr.Mapping (libpf.FrameMapping with Start, End, FileOffset, File)
  • Build mapping creation through libpf.NewFrameMapping and libpf.NewFrameMappingFile.

Applied diffs:

  • internal/component/pyroscope/ebpf/reporter/pprof.go and tests:
    - case support.TraceOriginUProbe:
    + case support.TraceOriginProbe:
    
    - if fr.MappingFile.Valid() {
    -   pfMapping := fr.MappingFile.Value()
    + if fr.Mapping.Valid() {
    +   mappingData := fr.Mapping.Value()
    +   pfMapping := mappingData.File.Value()
    
    - mapping, fresh = b.Mapping(fr.MappingStart, fr.MappingFile)
    + mapping, fresh = b.Mapping(mappingData.Start, mappingData.File)
  • Tests adjusted to construct frame mapping via Frame.Mapping and FrameMappingFile.

References:

  • ebpf-profiler fork history around 2025–2026 (PRs migrating mapping structures and probe naming).

go.opentelemetry.io/collector/confighttp (and related) — v1.45.x/0.139.x → v1.48.x/0.142.x — ❌ Changes Needed

Covered above in the main collector section; singling out here because it touches common utilities:

  • CookiesConfig now optional (presence enables it):
    - type Cookies struct { Enabled bool ... }
    - func (c *Cookies) Convert() otelconfighttp.CookiesConfig
    + func (c *Cookies) Convert() configoptional.Optional[otelconfighttp.CookiesConfig]
  • ToServer/ToClientConn changes require passing host.GetExtensions().

All changes are already applied in this PR.


Documentation updates (collector 0.139 → 0.142) — ⚠️ Needs Review

Docs updated to reflect:

  • Removal of opencensus receiver docs.
  • Kafka receiver topic configuration semantics (topics/exclude_topics).
  • S3 receiver partition format/timezone semantics.
  • Transform processor docs updated with new functions (extract_count_metric, extract_sum_metric, convert_summary_quantile_val_to_gauge, merge_histogram_buckets, set_semconv_span_name).

Action: Ensure external docs/website align with the installed version (0.142.0). These are already updated in this PR.


Suggested code changes (if you need to apply similar upgrades elsewhere)

  • Exporter queue settings:

    - cfg.QueueSettings = *q
    + cfg.QueueSettings = q
  • Optional Cookies config:

    - type Cookies struct { Enabled bool `alloy:"enabled,attr,optional"` }
    - func (c *Cookies) Convert() otelconfighttp.CookiesConfig { return otelconfighttp.CookiesConfig{ Enabled: c.Enabled } }
    + func (c *Cookies) Convert() configoptional.Optional[otelconfighttp.CookiesConfig] {
    +     if c == nil { return configoptional.None[otelconfighttp.CookiesConfig]() }
    +     return configoptional.Some(otelconfighttp.CookiesConfig{})
    + }
  • Kafka receiver block:

    - logs { topic = "otlp_logs"; encoding = "otlp_proto" }
    + logs {
    +   topics = ["otlp_logs"]
    +   encoding = "otlp_proto"
    +   exclude_topics = ["^logs-(test|dev)$"]
    + }
  • AWS S3 receiver:

    - s3_partition = "minute"
    + s3_partition_format   = "year=%Y/month=%m/day=%d/hour=%H/minute=%M"
    + s3_partition_timezone = "UTC"
  • Jaeger remote sampling ToServer/ToClientConn:

    - s.settings.ToServer(ctx, host, telemetry, mux)
    + s.settings.ToServer(ctx, host.GetExtensions(), telemetry, mux)
  • Beyla defaults and imports:

    - routes := beyla.DefaultConfig.Routes
    + routes := beyla.DefaultConfig().Routes
    
    - "go.opentelemetry.io/obi/pkg/kubeflags"
    + "go.opentelemetry.io/obi/pkg/kube/kubeflags"
  • Pyroscope eBPF reporter mapping:

    - case support.TraceOriginUProbe:
    + case support.TraceOriginProbe:
    
    - if fr.MappingFile.Valid() {...}
    + if fr.Mapping.Valid() {
    +   mapping := fr.Mapping.Value()
    +   // mapping.File, mapping.Start, mapping.End, mapping.FileOffset
    + }

Notes

  • Many indirects (AWS SDK v2, gRPC 1.78.0, otel v1.39.0, Prometheus procfs) are benign here — no code changes required in this repository.
  • The opencensus receiver has been removed from this distribution; configs should migrate to OTLP where necessary.
  • Replaces updated for:
    • go.opentelemetry.io/obi → grafana fork v1.4.11
    • go.opentelemetry.io/ebpf-profiler → grafana fork newer pseudo-version
      This drives the Pyroscope reporter changes referenced above.

If you plan further upgrades to 0.143.x, the same patterns (configoptional usage, contexts for extension registries) continue, so this scaffolding will hold.

@ptodev
Copy link
Copy Markdown
Contributor Author

ptodev commented Jan 14, 2026

@jharvey10 What would be a good title and a good "Brief description of Pull Request" for this PR? It's mostly a chore but contains a few features and a couple of breaking changes. There's also a new Beyla parameter which I'm not yet sure if I should document. I'll ask the Beyla team in a comment here.

}
}

sending_queue { }
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sending_queue is disabled by default in Alloy for otelcol.exporter.loadbalancing. It used to be disabled upstream too, but now it's enabled by default upstream. IDK if it's intentional or if it's an oversight, but I'll keep it disabled in Alloy for backwards compatibility.

expectedConfig.Instrumentations = args.Instrumentations
expectedConfig.AllowServiceGraphSelfReferences = true
expectedConfig.ExtraResourceLabels = args.ExtraResourceLabels
expectedConfig.ExtraSpanResourceLabels = []string{"k8s.cluster.name", "k8s.namespace.name", "service.version", "deployment.environment"}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grafana/beyla Do you know why this line changed? It's not very clear to me.

Comment thread docs/sources/reference/components/beyla/beyla.ebpf.md
Comment thread docs/sources/_index.md.t
Copy link
Copy Markdown
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! for the beyla changes.

Comment thread docs/sources/reference/components/beyla/beyla.ebpf.md
Comment thread docs/sources/reference/components/otelcol/otelcol.receiver.kafka.md Outdated
@@ -1,256 +0,0 @@
---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we have a page for this (just the header + this component was removed in 1.13) for at least one release. Thoughts @clayton-cornell ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could. I don't think this been done in the past - but that doesn't mean we can't do it now.

I can't remember if we've ever completely removed a component...

What we have as a guideline is this: https://grafana.com/docs/writers-toolkit/write/deprecate-remove/#removal which tells me we should add the warning to the top of the page and leave the contents as-is (without deleting) for at least one release cycle. In whatever future release we delete the content, we can add redirect to the main components page so people don't get a 404.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also empty the page as Sam suggested and just have the warning plus point the readers to where they should look instead.

Copy link
Copy Markdown
Contributor

@dehaansa dehaansa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM minus the two nits above.

@jharvey10
Copy link
Copy Markdown
Contributor

@jharvey10 What would be a good title and a good "Brief description of Pull Request" for this PR? It's mostly a chore but contains a few features and a couple of breaking changes. There's also a new Beyla parameter which I'm not yet sure if I should document. I'll ask the Beyla team in a comment here.

@ptodev Since these otel PRs are quite large, the typical rules we follow for changelog entries probably don't apply directly. There's a few routes you could take. I think my recommendation would be to have multiple changelog entries, along with a breaking changes section, if needed. I'm assuming the description from above includes one breaking change and one deprecation.

Breaking change?

  • otelcol.receiver.kafka: the global topic attribute has been deleted deleted; use the topics attributes inside the logs, metrics, and traces blocks instead.

Deprecation?

> * `otelcol.receiver.kafka`: The `topic` attribute inside the `logs`, `metrics`, and `traces` blocks has been deprecated in favour of a new `topics` attribute.

Example commit title (message) and extended description:

Title

feat(otelcol)!: Upgrade OTel Collector components to v0.142.0

Extended description

feat(beyla.ebpf): Upgrade Beyla to v2.8.5

feat(otelcol.receiver.kafka): Remove the global `topic` attribute

BREAKING-CHANGE: The global `topic` attribute has been deleted; use the `topics` attributes inside the `logs`, `metrics`, and `traces` blocks instead.

feat(otelcol.receiver.kafka): Deprecate the `topic` attribute inside the `logs`, `metrics`, and `traces` blocks in favour of a new `topics` attribute.

This would result in changelog entries similar to this:
image

@ptodev ptodev force-pushed the ptodev/update-otel branch from 62ae4ef to ad81e91 Compare January 20, 2026 09:37
@ptodev ptodev changed the title Upgrade to OTel Collector v0.142.0 feat(otelcol)!: Upgrade to OTel Collector v0.142.0 Jan 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 20, 2026

💻 Deploy preview deleted (feat(otelcol)!: Upgrade to OTel Collector v0.142.0).

Comment thread docs/sources/reference/components/otelcol/otelcol.receiver.kafka.md Outdated
Comment thread docs/sources/reference/components/otelcol/otelcol.receiver.kafka.md Outdated
@ptodev ptodev force-pushed the ptodev/update-otel branch from 552f2cf to a1445dc Compare January 20, 2026 16:56
@ptodev ptodev merged commit f1f457f into main Jan 20, 2026
50 checks passed
@ptodev ptodev deleted the ptodev/update-otel branch January 20, 2026 18:23
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants