Skip to content

Conversation

@blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Dec 10, 2025

What does this PR do?

Hides the healthcheckv2 extension from the elastic-agent status output.

Why is it important?

This extension is injected by the elastic-agent so it should not be included in the status as its not created by the user.

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 (covered by unit test)

Disruptive User Impact

The healthcheckv2 will no longer be included in status output.

How to test this PR locally

Run the elastic-agent with OTEL enabled, run elastic-agent status and observe that the healthcheckv2 extension is no longer in the status output.

Related issues

@blakerouse blakerouse self-assigned this Dec 10, 2025
@blakerouse blakerouse requested a review from a team as a code owner December 10, 2025 14:37
@blakerouse blakerouse added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-8.x Automated backport to the 8.x branch with mergify labels Dec 10, 2025
@blakerouse blakerouse added the backport-9.2 Automated backport to the 9.2 branch label Dec 10, 2025
@elasticmachine
Copy link
Contributor

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

pchila
pchila previously approved these changes Dec 10, 2025
Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

You need to check if the extension id is the one we injected. Otherwise, you might delete an extension added by the user.

@blakerouse
Copy link
Contributor Author

You need to check if the extension id is the one we injected. Otherwise, you might delete an extension added by the user.

@swiatekm Why don't we do this for the other 2 extensions that are hidden?

@pchila
Copy link
Member

pchila commented Dec 10, 2025

You need to check if the extension id is the one we injected. Otherwise, you might delete an extension added by the user.

@swiatekm Why don't we do this for the other 2 extensions that are hidden?

I kinda had the same question after seeing @swiatekm comment. Is it because healthcheckv2 can appear in user-provided config and the other 2 cannot ?

Nitpick: I think that the filtering should happen at the boundary with user/other systems when preparing the output (1 level up from where this is but since the other filtered extensions are already here I guess we put the filter here for consistency ?)

@blakerouse
Copy link
Contributor Author

You need to check if the extension id is the one we injected. Otherwise, you might delete an extension added by the user.

@swiatekm Why don't we do this for the other 2 extensions that are hidden?

I kinda had the same question after seeing @swiatekm comment. Is it because healthcheckv2 can appear in user-provided config and the other 2 cannot ?

Nitpick: I think that the filtering should happen at the boundary with user/other systems when preparing the output (1 level up from where this is but since the other filtered extensions are already here I guess we put the filter here for consistency ?)

There is no limit to a configuration that a user can provide, so I would expect that users can provide that as well. I kept the code consistent with this PR. If its best to filter based on what we inject then we should do that same for all 3.

@swiatekm
Copy link
Contributor

swiatekm commented Dec 10, 2025

You need to check if the extension id is the one we injected. Otherwise, you might delete an extension added by the user.

@swiatekm Why don't we do this for the other 2 extensions that are hidden?

We don't support using either of those in a collector config, so there's no need. Healthcheckv2 is an upstream component.

Technically, we probably should do it anyway, but I recall it was annoying to do so.

@blakerouse
Copy link
Contributor Author

@swiatekm That makes sense. I have updated this PR to keep it specifically about the healthcheckv2 extension. It now only removes based on the specific extension ID.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @blakerouse

@blakerouse blakerouse merged commit 81d77f5 into elastic:main Dec 11, 2025
22 checks passed
@blakerouse blakerouse deleted the fix-11714 branch December 11, 2025 15:38
mergify bot pushed a commit that referenced this pull request Dec 11, 2025
* Hide healthcheckv2 from agent status.

* Add changelog entry.

* Update entry.

* Filter out by specific UUID.

(cherry picked from commit 81d77f5)

# Conflicts:
#	internal/pkg/otel/manager/manager.go
@blakerouse blakerouse removed the backport-8.x Automated backport to the 8.x branch with mergify label Dec 11, 2025
blakerouse added a commit that referenced this pull request Dec 12, 2025
…11750)

* [OTEL] Hide healthcheckv2 from agent status. (#11718)

* Hide healthcheckv2 from agent status.

* Add changelog entry.

* Update entry.

* Filter out by specific UUID.

(cherry picked from commit 81d77f5)

# Conflicts:
#	internal/pkg/otel/manager/manager.go

* Fix merge conflict.

---------

Co-authored-by: Blake Rouse <[email protected]>
@blakerouse blakerouse added the backport-8.19 Automated backport to the 8.19 branch label Dec 12, 2025
mergify bot pushed a commit that referenced this pull request Dec 12, 2025
* Hide healthcheckv2 from agent status.

* Add changelog entry.

* Update entry.

* Filter out by specific UUID.

(cherry picked from commit 81d77f5)

# Conflicts:
#	internal/pkg/otel/manager/manager.go
blakerouse added a commit that referenced this pull request Dec 12, 2025
…#11775)

* [OTEL] Hide healthcheckv2 from agent status. (#11718)

* Hide healthcheckv2 from agent status.

* Add changelog entry.

* Update entry.

* Filter out by specific UUID.

(cherry picked from commit 81d77f5)

# Conflicts:
#	internal/pkg/otel/manager/manager.go

* Fix conflict.

---------

Co-authored-by: Blake Rouse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch backport-9.2 Automated backport to the 9.2 branch 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.

[OTEL] healthcheckv2extension should be hidden in elastic-agent status output

4 participants