Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 25, 2025

What does this PR do?

It ensures otel collector component status reported to Fleet has the right component type sets for receivers and exporters. Respectively, we have exporter -> output and receiver -> input.

It also does some internal refactoring. The Fleet status translation code was using its own otelhelpers package. I moved the contents of that package to otel/translate and made all the status translation code use it, unifying the logic between Fleet status and local status. This improves some of the error messages for local status as a side effect.

I've also added unit tests for the Fleet status translation.

Why is it important?

Fleet knows about input and output component types, so it can now display status for native otel integrations.

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

This is slightly involved, as we don't have any native Otel integrations with actual otel collector configurations.

  1. Build agent locally from this PR.
  2. Build one of the proposed native otel integration locally. I checked out [Draft] Add docker_otel_input package integrations#15739 and ran elastic-package build --zip to generate the integration archive.
  3. Upload the integration archive to Kibana.
  4. Create an agent policy using the integration.
  5. Start an agent locally from the built binary and enroll it into the policy.

You should see the integration show up in the UI:
Screenshot_20251117_173604

You can also look at the agent document to see the types set in the status.

Related issues


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

* Set correct types for otel components in Fleet status

* Log a warning if we get a malformed otel component status id

* Only sort checkin output in tests

* Fix new unit tests

(cherry picked from commit 1144501)
@mergify mergify bot added the backport label Nov 25, 2025
@mergify mergify bot requested a review from a team as a code owner November 25, 2025 13:08
@mergify mergify bot requested review from swiatekm and ycombinator and removed request for a team November 25, 2025 13:08
@github-actions github-actions bot added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog labels Nov 25, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

cc @swiatekm

@swiatekm swiatekm merged commit 5e5c75b into 9.2 Nov 25, 2025
22 of 23 checks passed
@swiatekm swiatekm deleted the mergify/bp/9.2/pr-11233 branch November 25, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants