Skip to content

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

Merged
andrzej-stencel merged 4 commits into
elastic:9.5from
andrzej-stencel:backport-17977-9.5
Nov 18, 2026
Merged

andrzej-stencel merged 4 commits into
elastic:9.5from
andrzej-stencel:backport-17977-9.5

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:

Conflict resolution

Rollout and safety

Users who set mapping::mode on the Elasticsearch exporter, or keep_alives_enabled on an HTTP server, must remove these settings, because the Collector now fails to start with them. The changelog fragments describe this.

Testing

  • go build ./... and go vet pass for both Go modules.
  • Unit tests pass for internal/pkg/otel/... (including the OTel manager tests with the EDOT testing binary), dev-tools/mage/otel and all internal/edot packages.
  • 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:12
@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 samuelvl and removed request for a team November 17, 2026 10:12
@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.

@mergify

mergify Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b backport-17977-9.5 upstream/backport-17977-9.5
git merge upstream/9.5
git push upstream backport-17977-9.5

andrzej-stencel and others added 2 commits November 17, 2026 11:40
Bump sigv4authextension, added on 9.5 by elastic#18031, to v0.165.1 to match the other Contrib components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Elasticsearch exporter no longer accepts mapping::mode, so
TestSamples failed on Linux. This sample only exists on 9.5, so the
cherry-pick of elastic#17977 did not touch it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @andrzej-stencel

@andrzej-stencel
andrzej-stencel enabled auto-merge (squash) November 17, 2026 13:10
9.5 gained elastic#18033 (drop diagnostic hooks for stopped otel components),
so apply the part of elastic#17977 that ports elasticdiagnostics to
extensioncapabilities.ComponentStatusWatcher: collector 0.165 no longer
calls componentstatus.Watcher, and TestDiagnosticHooksDroppedOnPartialReload
failed without it. go.mod keeps the 0.165 versions with 9.5's
consumer/service/receiver moves to direct dependencies; NOTICE regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrzej-stencel
andrzej-stencel merged commit e6fcf08 into elastic:9.5 Nov 18, 2026
42 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