Skip to content

[8.19] (backport #8991) Add component and unit diagnostics for beats receivers #9051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 17, 2025

What does this PR do?

Add the ability for the otel manager to output diagnostics for components and units it runs. This PR doesn't add any actual diagnostic content, just the necessary scaffolding and tests.

The filebeat registry and beat metrics will be added in follow-up PRs.

Why is it important?

Beat receivers need to be covered by diagnostics to ensure issues with them can be effectively diagnosed.

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

Build the agent, run it with self-monitoring using beats receivers enabled, and collect diagnostics. You should see the expected directories without any files.

Related issues


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

* Add diagnostics to otel manager

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_test.go
#	internal/pkg/otel/manager/manager.go

* add integration test

* Move helper function to allow diagnostic tests to run on Windows

* Handle diagnostics errors separately

* Centralize locking for config updates

* Make tests more explicit

* Early exit from diagnostics generation function

* Refactor config generation for easier locking

(cherry picked from commit ce0519f)
@mergify mergify bot added the backport label Jul 17, 2025
@mergify mergify bot requested a review from a team as a code owner July 17, 2025 08:28
@mergify mergify bot requested review from rubenruizdegauna and removed request for a team July 17, 2025 08:28
@mergify mergify bot requested a review from pchila July 17, 2025 08:28
@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 skip-changelog labels Jul 17, 2025
@elasticmachine
Copy link
Collaborator

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

@elasticmachine
Copy link
Collaborator

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

@swiatekm swiatekm enabled auto-merge (squash) July 17, 2025 08:32
Copy link

@swiatekm swiatekm merged commit 3e97b1d into 8.19 Jul 17, 2025
21 checks passed
@swiatekm swiatekm deleted the mergify/bp/8.19/pr-8991 branch July 17, 2025 10:23
@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

cc @swiatekm

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 skip-changelog 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.

2 participants