Skip to content

[9.4] (backport #17977) feat: update OTel Collector components from 0.164.x to 0.165.x - #18050

Merged
andrzej-stencel merged 1 commit into
elastic:9.4from
andrzej-stencel:backport-17977-9.4
Nov 18, 2026
Merged

andrzej-stencel merged 1 commit into
elastic:9.4from
andrzej-stencel:backport-17977-9.4

Conversation

@andrzej-stencel

Copy link
Copy Markdown
Contributor

Related issues

Risk

  • Low: isolated change, no effect on Fleet connectivity, policy handling, or upgrades
  • Medium: changes existing behavior, but is feature flagged or a failure does not affect Fleet connectivity, policy handling, or upgrades
  • High: touches Fleet connectivity, policy application, upgrade/rollback, installation, or changes defaults for existing users

Rationale

Manual backport of #17977, because Mergify could not resolve the conflicts.

This PR updates the OTel Collector components from 0.164.x to 0.165.x (Core v0.165.0 / v1.71.0, Contrib v0.165.1, Elastic components v0.81.0). It also removes the settings that the updated components no longer accept (mapping::mode of the Elasticsearch exporter and keep_alives_enabled of the healthcheckv2 extension).

It also bumps the beats submodule from 7e90872690 to a3615484b4, the head of Beats 9.4, which already has the OTel 0.165.x update. Beats commits pulled in:

The Beats bump moves github.com/elastic/elastic-agent-client/v7 from v7.18.1 to v7.20.0.

Conflict resolution

  • go.mod / go.sum (root and internal/edot): took the higher version of each module, then ran go mod tidy. Modules that the conflict hunks only bumped because of main context and that nothing requires were reset to their 9.4 versions: AWS SDK and Google API modules in internal/edot, go-errors, and k8s.io/apiserver/component-base. NOTICE.txt, NOTICE-fips.txt and internal/edot/README.md were regenerated.
  • Samples and the Helm chart: kept the 9.4 content and removed only the mapping::mode setting. internal/edot/samples/linux/profiles_metrics.yml still uses the Elasticsearch exporter on 9.4 (on main it uses the OTLP/HTTP exporter), so mapping::mode was removed there as well.
  • internal/pkg/otel/extension/elasticdiagnostics: kept the 9.4 version. On 9.4 the extension doesn't watch component status (no ComponentStatusChanged), so the extensioncapabilities.ComponentStatusWatcher change doesn't apply. The elastic_meter_lifecycle extension and the Prometheus integration tests don't exist on 9.4, so their changes were dropped.
  • Docs: the note about mapping::mode in elasticsearchexporter.md conflicted with main-only wording, so the 9.4 text was kept. The other docs changes applied cleanly.

Rollout and safety

Users who set mapping::mode on the Elasticsearch exporter or keep_alives_enabled on an HTTP server must remove these settings, otherwise the Collector fails to start. The changelog fragments from #17977 describe this.

Testing

  • go build ./... and go vet ./... pass in the root and internal/edot modules.
  • Unit tests pass for internal/pkg/otel/..., internal/pkg/agent/application/..., dev-tools/mage/otel/... and all of internal/edot (after mage build:unitTestBinaries).
  • mage check passes.

🤖 Generated with Claude Code

…ic#17977)

* Update elastic/beats to 65bae9ee687e

Also updates OTel Collector components from 0.164.x to 0.165.x:
Core v0.165.0 / v1.71.0, Contrib v0.165.1 (k8sattributesprocessor v1.4.1),
and Elastic OTel components to v0.81.0.

Removes settings that are no longer accepted by the updated components:
- `keep_alives_enabled` from the healthcheckv2 extension config injected
  by the OTel manager (removed from confighttp server settings).
- `mapping::mode` from the Elasticsearch exporter in samples, Helm chart,
  docs and test data (removed from the exporter; it was already ignored).

Created-by: Claude Opus 5.5
Co-authored-by: Cursor <cursoragent@cursor.com>

* Use beats/v7/pkg types in heartbeat browser CA integration test

The test was added with elastic-agent-libs imports while elastic#17917 moved the
shared test helpers to beats/v7/pkg, so the testing/integration/ess package
no longer compiled.

Created-by: Claude Opus 5.5
Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove unsupported sending_queue from prometheus_remote_write test configs

The Prometheus remote write exporter has never supported sending_queue
(it uses remote_write_queue). Before confighttp v1.71.0, the custom
Unmarshal of the squash-embedded confighttp.ClientConfig used
WithIgnoreUnused, which made the exporter silently accept unknown keys.
confighttp v1.71.0 dropped that Unmarshal, so unknown keys are now
rejected and the collector failed to start in these tests.

Created-by: Claude Opus 5.5
Co-authored-by: Cursor <cursoragent@cursor.com>

* Apply suggestion from @alexandra5000

Co-authored-by: Aleksandra Spilkowska <96738481+alexandra5000@users.noreply.github.com>

* Apply suggestion from @alexandra5000

Co-authored-by: Aleksandra Spilkowska <96738481+alexandra5000@users.noreply.github.com>

* docs: update removed versions

* fix: use extensioncapabilities.ComponentStatusWatcher in status-watching extensions

Collector v0.165.0 deprecated componentstatus.Watcher and no longer calls
it: the service now notifies only extensions that implement
extensioncapabilities.ComponentStatusWatcher (method Changed).

The elastic_diagnostics and elastic_meter_lifecycle extensions only
implemented the old interface, so they stopped receiving StatusStopped
events. Diagnostic hooks of receivers torn down by a partial reload were
never dropped (TestDiagnosticHooksDroppedOnPartialReload failed), and the
meters of stopped receivers were never released.

Implement the new interface in both extensions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* build: don't list extensioncapabilities as an EDOT component

The EDOT README generator treats every direct OTel dependency whose path
contains /extension/ as an extension component. The meterlifecycle
extension now imports extensioncapabilities directly for the
ComponentStatusWatcher interface, so the generator listed that API module
as an extension and check-ci failed on the stale README.

Skip modules that hold collector APIs rather than a component, starting
with extensioncapabilities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Aleksandra Spilkowska <96738481+alexandra5000@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 073f69a)
@andrzej-stencel
andrzej-stencel requested review from a team as code owners November 17, 2026 10:06
@andrzej-stencel andrzej-stencel added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport labels Nov 17, 2026
@andrzej-stencel
andrzej-stencel requested review from macdewee and removed request for a team November 17, 2026 10:06
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@mergify

mergify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@andrzej-stencel
andrzej-stencel enabled auto-merge (squash) November 17, 2026 13:11
@andrzej-stencel
andrzej-stencel merged commit 44f3f8e into elastic:9.4 Nov 18, 2026
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants