-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add CPU profiling and component-level diagnostics #3118
Add CPU profiling and component-level diagnostics #3118
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This pull request does not have a backport label. Could you fix it @fearful-symmetry? 🙏
NOTE: |
🌐 Coverage report
|
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.
Change looks good.
A couple comments, I believe the one for stoping the CPU profile on context cancellation needs to be fixed before merge.
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.
Updates look great!
What does this PR do?
Follow-up to elastic/elastic-agent-client#80
Part of #2140 and #2141
NOTE: Before the above two issues are actually closed, after we merge this we also need to update
elastic-agent-client
in beats itself.This PR accomplishes a few things:
DiagnosticComponentsRequest
call and anAdditionalDiagnosticRequest
request field. This allows us to request an optional CPU profile to the diagnostic bundle.components/
directory, and not copied per-unitIt should be noted that codepath for component diagnostics is different from the normal unit-diagnostics in a number of ways:
PerformComponentDiagnostics
method returns an error value, the corresponding unit-level diagnostic does notWhy is it important?
We want CPU profiling in diagnostics
Checklist
./changelog/fragments
using the changelog toolHow to test this PR locally
elastic-agent diagnostics -p