Skip to content

feat(archive): include recording labels for startTime, duration, activeRecordingId#1669

Open
andrewazores wants to merge 4 commits into
cryostatio:mainfrom
andrewazores:archives-duration-id-labels
Open

feat(archive): include recording labels for startTime, duration, activeRecordingId#1669
andrewazores wants to merge 4 commits into
cryostatio:mainfrom
andrewazores:archives-duration-id-labels

Conversation

@andrewazores

@andrewazores andrewazores commented Jun 26, 2026

Copy link
Copy Markdown
Member

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


Fixes #1665

Description of the change:

When Cryostat archives a recording, add additional labels:

  1. activeRecordingId, the database ID of the ActiveRecording record in the database. Along with the existing jvmId label this enables complete audit log lookup of what the source recording was
  2. duration, for a fixed-length recording this is simply the recording duration that was set. For an ongoing continuous recording this is the difference in time between when the recording was started and the moment it's being archived, or the recording's maxAge if it's less than that timespan.
  3. startTime, simply the timestamp when the recording was started

Motivation for the change:

See #1665 , #1605 , and cryostatio/cryostat-mcp#26 . If archived recordings are appropriately labelled so that a client (like the Cryostat MCP) can approximate the timestamp range covered by a recording file, then a series of files can be collected and concatenated to form a synthetic recording covering a wider span.

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... bash smoketest.bash...
  2. ...

@Josh-Matsuoka Josh-Matsuoka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good once merge conflicts are fixed

@andrewazores andrewazores force-pushed the archives-duration-id-labels branch from 22de9b5 to d44cfb6 Compare June 30, 2026 15:30
@andrewazores

Copy link
Copy Markdown
Member Author

/build_test

@github-actions

Copy link
Copy Markdown

Workflow started at 6/30/2026, 11:31:10 AM. View Actions Run.

@github-actions

Copy link
Copy Markdown

CI build:
Integration tests pass ✅
Tests run: 49, Failures: 0, Errors: 0, Skipped: 6
https://github.com/cryostatio/cryostat/actions/runs/28456194285

@andrewazores andrewazores force-pushed the archives-duration-id-labels branch from d44cfb6 to d831b84 Compare June 30, 2026 15:45
@andrewazores

Copy link
Copy Markdown
Member Author

@Josh-Matsuoka merge conflicts are fixed

@github-actions

Copy link
Copy Markdown

CI build:
Unit tests pass ✅
Tests run: 614, Failures: 0, Errors: 0, Skipped: 1
https://github.com/cryostatio/cryostat/actions/runs/28456194285

@andrewazores andrewazores force-pushed the archives-duration-id-labels branch from 9145fe5 to 4f61d67 Compare June 30, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport feat New feature or request safe-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Archived recordings have a timestamp and archivedTime field but no startTime or duration

2 participants