Skip to content

[9.2] (backport #11234) [otelmanager] emit starting state in the beginning #11337

Merged
VihasMakwana merged 3 commits into9.2from
mergify/bp/9.2/pr-11234
Nov 24, 2025
Merged

[9.2] (backport #11234) [otelmanager] emit starting state in the beginning #11337
VihasMakwana merged 3 commits into9.2from
mergify/bp/9.2/pr-11234

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Nov 21, 2025

What does this PR do?

This PR introduces support for emitting a STARTING state when the collector is expect the collector to start.

Why is it important?

Right now, we default to a STOPPED state whenever an error occurs while accessing the healthcheck port. As a result, the elastic-agent status output does not show any monitoring components. If this error occurs consistently every time the collector starts, those components will never appear in elastic-agent status.

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

For mac,

  1. Build agent from this branch
  2. Sign out of docker desktop.
  3. Install and enroll the agent into fleet.
  4. Notice the status. You'll first see Starting state, then Failed state with message OTel manager failed ... process exited with status 1.

Related issues


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

* feat: emit starting state

* test

* rename method

* emit starting state

* fix test

* comments

* fix case

* ut

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

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

VihasMakwana
VihasMakwana previously approved these changes Nov 21, 2025
@VihasMakwana VihasMakwana enabled auto-merge (squash) November 21, 2025 13:59
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Nov 24, 2025

This pull request has not been merged yet. Could you please review and merge it @VihasMakwana? 🙏

@VihasMakwana VihasMakwana merged commit aad08da into 9.2 Nov 24, 2025
20 of 21 checks passed
@VihasMakwana VihasMakwana deleted the mergify/bp/9.2/pr-11234 branch November 24, 2025 10:44
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @VihasMakwana

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.

2 participants