Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Dec 22, 2025

What does this PR do?

Add a custom telemetry factory and receiver to the OTel collector build to support backwards-compatible ingestion of Collector metrics as ECS metrics that can be viewed in existing Agent dashboards (see #10220 for context on the prometheus-based approach this replaces).

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

How to test this PR locally

Running Agent with metrics monitoring enabled and any components using the OTel runtime, you should see collector metric data appear in the metrics.elastic_agent* datastreams.

Related issues


This is an automatic backport of pull request #11813 done by [Mergify](https://mergify.com).

* internal telemetry drafting

* monitoring config plumbing

* Cleaning up / commenting for review

* removing no-longer-used files

* cleanup, testing

* cleanup, pass through remaining config

* remove debug placeholders

* clean up receiver code layout

* remove debug startup

* Make check-ci

* Fix formatting in go.mod for pdata dependency

* review comments

* lint

* fix config field name

* Move receiver package

* Use more translate helpers

* white space

* add changelog

* Disable the previous (prometheus) internal telemetry ingestion component

* Lint, log errors

* Add remaining translated metrics

* fix typo

* update tests

* lint

* add error log

* mage check

* mage notice

* review comment

* Stop integration tests from expecting a prometheus monitoring component

* Move internal telemetry factory to same module as telemetry receiver

* mage check

* mage notice

* test fixes

* adjust default poll interval

* add allowable monitoring errors

* Adjust expected component count

* Only include the otel monitoring receiver if the otel monitoring output is present

* remove checks for prometheus-related log warnings

* Replace empty test error with verbose failure details

* remove duplicated lines

* fix error log order

---------

Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co>
(cherry picked from commit 7c84fc3)
@mergify mergify bot added the backport label Dec 22, 2025
@mergify mergify bot requested a review from a team as a code owner December 22, 2025 16:28
@mergify mergify bot requested review from michel-laterman and swiatekm and removed request for a team December 22, 2025 16:28
@mergify mergify bot assigned faec Dec 22, 2025
@github-actions github-actions bot added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Dec 22, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 23, 2025

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 Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants