-
Notifications
You must be signed in to change notification settings - Fork 553
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
rpk: add cpu_profile
to rpk debug bundle
#16414
Conversation
To modify defaults in our Admin API client. This can be easily expanded to support modifying: - MaxRetries - Backooff Function - LogHook Function. In the future.
677210e
to
5be5800
Compare
new failures in https://buildkite.com/redpanda/redpanda/builds/44564#018d6267-ca50-4e98-99b2-64d5cf4d229e:
new failures in https://buildkite.com/redpanda/redpanda/builds/44564#018d6279-eb74-47e3-bc2f-f9daf6de91eb:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44564#018d6267-ca50-4e98-99b2-64d5cf4d229e ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44564#018d6267-ca53-45e3-aa0d-0a15ded6ae7a |
b93d25b
to
ab7747c
Compare
@@ -186,3 +193,10 @@ func (a *AdminAPI) DebugPartition(ctx context.Context, namespace, topic string, | |||
var response DebugPartition | |||
return response, a.sendAny(ctx, http.MethodGet, fmt.Sprintf("/v1/debug/partition/%v/%v/%v", namespace, topic, partitionID), nil, &response) | |||
} | |||
|
|||
// RawCPUProfile returns the raw response of the CPU profiler. | |||
func (a *AdminAPI) RawCPUProfile(ctx context.Context, wait time.Duration) ([]byte, error) { |
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.
+1 for this PR
Maybe if we do Raw a lot, we can just introduce a
func (*AdminAPI) RawRequest(ctx context.Context, pathfmt string, pathargs ...interface{})
or some other similar API
This commit add the CPU profile to every debug bundle with a default 30ms of wait sample.
ab7747c
to
43360ab
Compare
@r-vasquez we should update the diag bundle docs to show this in the payload. Thnx |
This PR adds the raw response of the CPU profile admin endpoint to the bundle generated by
rpk debug bundle
.It introduces a new flag:
--cpu-profiler-wait
with a default of30s
, which sets the internalwait_ms
of the Admin API'sGET /v1/debug/cpu_profile
File Location:
bundle/admin/cpu_profile_<node_address>.json
Fixes #13175
Backports Required
Release Notes
Features
rpk debug bundle
now includes a CPU profile of the requested nodes.