Use beat receiver subcomponent status for status translation#11856
Merged
Use beat receiver subcomponent status for status translation#11856
Conversation
5107c8f to
2c4e9b0
Compare
f31716a to
a0dd319
Compare
a0dd319 to
3300b7d
Compare
dc60a82 to
aedd81a
Compare
Contributor
|
This pull request is now in conflicts. Could you fix it? 🙏 |
# Conflicts: # internal/pkg/otel/manager/execution_subprocess.go
# Conflicts: # go.mod # go.sum # internal/edot/go.sum
aedd81a to
fd1cf17
Compare
Contributor
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
Contributor
|
This pull request is now in conflicts. Could you fix it? 🙏 |
# Conflicts: # go.mod
9bceeec to
190cf65
Compare
cmacknz
previously approved these changes
Jan 15, 2026
cmacknz
reviewed
Jan 19, 2026
Contributor
⏳ Build in-progress, with failures
Failed CI StepsHistory
cc @swiatekm |
Member
|
Notice needs to be updated, otherwise LGTM (again - this one is cursed apparently) |
cmacknz
approved these changes
Jan 19, 2026
mergify bot
pushed a commit
that referenced
this pull request
Jan 19, 2026
* Move status serialization to a separate package # Conflicts: # internal/pkg/otel/manager/execution_subprocess.go * Get stream status from event attributes * Add integration test * Use patched healthcheckv2 extension # Conflicts: # go.mod # go.sum # internal/edot/go.sum * Fix state translation for filestream inputs without streams * Check attributes when comparing status events * Use the elastic collector contrib fork * Add more comments * Fix comments # Conflicts: # go.mod * Ensure attributes are always set in events * Handle event attributes parsing error correctly * mage notice (cherry picked from commit b3a6511)
5 tasks
swiatekm
added a commit
that referenced
this pull request
Jan 19, 2026
…#12322) * Move status serialization to a separate package # Conflicts: # internal/pkg/otel/manager/execution_subprocess.go * Get stream status from event attributes * Add integration test * Use patched healthcheckv2 extension # Conflicts: # go.mod # go.sum # internal/edot/go.sum * Fix state translation for filestream inputs without streams * Check attributes when comparing status events * Use the elastic collector contrib fork * Add more comments * Fix comments # Conflicts: # go.mod * Ensure attributes are always set in events * Handle event attributes parsing error correctly * mage notice (cherry picked from commit b3a6511) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Uses subcomponent status metadata emitted by beats receivers to set unit and stream status for running components. This brings beat receiver status reporting up to par with beats processes.
As part of the implementation, I moved the otel status event serialization logic to its own package, so I can reuse it in status translation. Subcomponent statuses come in an untyped map and need to be converted to a status.Event struct before we can calculate the statuses.
This PR currently imports a patched status aggregation package from collector contrib, as the upstream PR adding the necessary functionality hasn't been merged yet. This uses our official fork and we'll have to maintain it through otel contrib upgrades until it lands and is released.
Why is it important?
Beats receivers and beats processes should be at feature parity. In particular, individual units and streams should have their status set based on the underlying beats input or module, and not based on the aggregated status of the whole receiver. If a system/metrics module emits a diagnostic message about some targets being unreachable (because they're processes owned by another uses and agent isn't running as root, for example), then this should work as expected too with beats receivers.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragmentsusing the changelog toolHow to test this PR locally
Build agent locally and try the following config. You should see degraded statuses on the streams.
Related issues