Skip to content
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

[Task] Embed details about target in recording metadata file #41

Closed
maxcao13 opened this issue Jul 28, 2023 · 2 comments
Closed

[Task] Embed details about target in recording metadata file #41

maxcao13 opened this issue Jul 28, 2023 · 2 comments
Labels
feat New feature or request

Comments

@maxcao13
Copy link
Member

maxcao13 commented Jul 28, 2023

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:

  1. the recording primary key, just an int ID
  2. the source recording ID foreign key
  3. 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 #34 (comment)

@maxcao13 maxcao13 added the feat New feature or request label Jul 28, 2023
@maxcao13 maxcao13 moved this to Todo in 3.0.0 release Jul 28, 2023
@tthvo tthvo self-assigned this Oct 6, 2023
@tthvo tthvo removed their assignment Jan 11, 2024
@andrewazores andrewazores moved this from Todo to Stretch Goals in 3.0.0 release Feb 13, 2024
@andrewazores andrewazores moved this to Backlog in 4.0.0 release Jun 7, 2024
@andrewazores
Copy link
Member

I can't seem to find where else I had written this down, if anywhere, but another approach to this problem would be to simply not delete Targets from the database when they are lost. Then the archived recording table only needs to link the file path (in S3) to the recording, and the target ID as a foreign key.

@andrewazores
Copy link
Member

See #66 for a better idea/description

@github-project-automation github-project-automation bot moved this from Backlog to Done in 4.0.0 release Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
Status: Done
Status: Stretch Goals
Development

No branches or pull requests

3 participants