-
Notifications
You must be signed in to change notification settings - Fork 146
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
Use different timeout values for CPU and non-CPU diagnostic requests #3794
Use different timeout values for CPU and non-CPU diagnostic requests #3794
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This pull request does not have a backport label. Could you fix it @fearful-symmetry? 🙏
NOTE: |
Test failing because of #3793 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor suggestions, code is ok otherwise.
Maybe it would be worth adding a test (doesn't have to be a full-fledged integration test, probably a simple combination of runtime manager and fake input would work) so that we can put a hard limit on how long it takes for diagnostics in case we have a component that does not support the diagnostics action ?
@pchila yah, was kinda on the fence about tests, since I wasn't sure how effective it would be to test essentially a single |
Well I was thinking of adding a test here to detect if code changes (not just in this PR) make elastic-agent diagnostics wait a lot longer in case some component does not implement the diagnostic action. |
SonarQube Quality Gate |
What does this PR do?
Part of #3197, this is a fairly simple change that has the diagnostic request use two different timeout values depending on if we've requested additional CPU metrics. This isn't meant to solve #3197, but serves to fix one of the causes.
Why is it important?
This is meant to prevent us from waiting extended periods of time when
endpoint
isn't responding to diagnostic requests.Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files./changelog/fragments
using the changelog tool