Skip to content

feat(diagnostics): Add endpoint for triggering heap dumps#671

Merged
andrewazores merged 9 commits intocryostatio:mainfrom
Josh-Matsuoka:heap-dumps
Sep 16, 2025
Merged

feat(diagnostics): Add endpoint for triggering heap dumps#671
andrewazores merged 9 commits intocryostatio:mainfrom
Josh-Matsuoka:heap-dumps

Conversation

@Josh-Matsuoka
Copy link
Copy Markdown
Contributor

@Josh-Matsuoka Josh-Matsuoka commented Jul 4, 2025

Fixes cryostatio/cryostat#134

Adds agent support for interacting with the heap dumps system. This allows you to trigger and retrieve heap dumps from a target with the agent enabled. This is done through the mbean-invoke endpoint and the HotspotDiagnosticMBean to create the heap dump, then a similar mechanism to the recording harvester that pushes the heap dump to the server through the heapdump/upload endpoint.

To test:

Setup

Diagnostics Card

  • Check that the Heap Dumps button appears on the diagnostics card.
  • Verify that clicking the Invoke Heap Dumps button triggers 2 notifications, one for a successful invocation (Heap Dump Success), and one for a successful upload to the server (Heap Dump Uploaded)
  • Verify that the redirect button becomes enabled and takes you to the Heap Dumps table

Capture Diagnostics Page

  • Check that the Heap Dumps button appears on the capture diagnostics page.
  • Verify that clicking the Invoke Heap Dumps button triggers 2 notifications, one for a successful invocation (Heap Dump Success), and one for a successful upload to the server (Heap Dump Uploaded)
  • Verify that the redirect button becomes enabled and takes you to the Heap Dumps table

Heap Dumps Table

  • Check that the earlier triggered heap dumps appear in the table with a name, last modified time, and file size that makes sense
  • Verify that each table entry has a dropdown for downloading and deleting the heap dump.
  • Verify that heap dumps can be downloaded and deleted.
  • Verify that deleting a heap dump produces a notification (Heap Dump Deleted) and refreshes the table

@mergify mergify bot added the safe-to-test label Jul 4, 2025
@Josh-Matsuoka Josh-Matsuoka marked this pull request as ready for review August 29, 2025 20:14
@andrewazores andrewazores merged commit ea456d9 into cryostatio:main Sep 16, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature or request safe-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request] Add option to trigger a heap dump

2 participants