cryostat-legacy
cryostat-legacy copied to clipboard
[Task] Embed details about target in recording metadata file
In the longer term I'm tempted to say let's do something much more radical. We can safely embed those details about the source target (alias, connectUrl, JVM ID, labels/annotations) into a .metadata.json
file that accompanies the recording now that we have somewhere better to store those details than the recording filename. The file itself could just be named something simple like ${target_alias}.${sequence}.jfr
- the timestamp can/should simply be in the created/modified timestamp of the file but might also be embedded in the JSON metadata, too. We can model this by creating something like an ArchivedRecording
table in Postgres that has columns for:
- the recording primary key, just an int ID
- the source recording ID foreign key
- the filename as it was saved in S3
If we redo the tables for targets and active recordings so that we don't delete records when targets go offline or recordings are deleted, and instead add a status flag column, then we can always go back and look up the details of the source recording for an archived recording, and from there also look up the details of the source target.
Originally posted by @andrewazores in https://github.com/cryostatio/cryostat3/issues/34#issuecomment-1655608149