Skip to content

Conversation

@andrewazores
Copy link
Member

@andrewazores andrewazores commented Nov 18, 2025

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


See #1151
Based on #1151

Description of the change:

Avoid the old flow of copying recording file contents to a local temp file before POSTing to jfr-datasource. For archived recordings when not using presigned URL transfers this would involve Cryostat downloading the archived JFR file from storage into a temp file, then POSTing that file. For active recordings Cryostat would open a remote target connection and stream the recording contents into a temp file, then POST that file. The new flow avoids writing a temp file and uses streamed data instead - either the HTTP GET response stream from storage, or the target connection recording data stream, and sends the POST to jfr-datasource by directly piping that stream.

Motivation for the change:

Avoid the need for Cryostat's tmp space to be able to accommodate arbitrarily large JFR file data. This also reduces overall "view in Grafana" action request latency since the data does not need to be fully written to tmp file before beginning to upload it to the datasource.

How to manually test:

  1. Check out and build PR
  2. ./smoketest.bash -O -t quarkus-cryostat-agent
  3. Create active and archived recordings on Cryostat, quarkus-cryostat-agent, jfr-datasource, etc. and test that "view in Grafana" works for archived recordings, active recordings via JMX, and active recordings via HTTP.

@andrewazores andrewazores added chore Refactor, rename, cleanup, etc. safe-to-test labels Nov 18, 2025
@andrewazores andrewazores changed the title chore(jfr-datasource): refactor to perform uploads using inpustreams only perf(jfr-datasource): refactor to perform uploads using inpustreams only Nov 18, 2025
@andrewazores andrewazores added perf and removed chore Refactor, rename, cleanup, etc. labels Nov 18, 2025
@andrewazores andrewazores force-pushed the grafana-upload-streams branch from 03d6479 to ca24167 Compare November 18, 2025 17:21
@andrewazores andrewazores marked this pull request as ready for review November 18, 2025 17:21
@github-actions
Copy link

This PR/issue depends on:

@andrewazores andrewazores requested a review from a team November 18, 2025 17:22
@andrewazores andrewazores changed the title perf(jfr-datasource): refactor to perform uploads using inpustreams only perf(jfr-datasource): refactor to perform uploads using streams Nov 18, 2025
@andrewazores
Copy link
Member Author

/build_test

@github-actions
Copy link

Workflow started at 11/18/2025, 12:33:20 PM. View Actions Run.

@github-actions
Copy link

No GraphQL schema changes detected.

@github-actions
Copy link

No OpenAPI schema changes detected.

@github-actions
Copy link

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/19475390526

@andrewazores andrewazores force-pushed the grafana-upload-streams branch from ca24167 to 347c819 Compare November 28, 2025 15:24
@andrewazores
Copy link
Member Author

/build_test

@github-actions
Copy link

Workflow started at 11/28/2025, 10:30:30 AM. View Actions Run.

@github-actions
Copy link

No GraphQL schema changes detected.

@github-actions
Copy link

No OpenAPI schema changes detected.

@github-actions
Copy link

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/19768064533

@andrewazores andrewazores force-pushed the grafana-upload-streams branch from 347c819 to e4f511e Compare December 2, 2025 15:04
@andrewazores andrewazores merged commit 8cf31cf into cryostatio:main Dec 2, 2025
8 checks passed
@andrewazores andrewazores deleted the grafana-upload-streams branch December 2, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants