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

feat(svc): add recording start method using event template name and type #245

Merged

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Jun 28, 2023

  • chore(svc): extract EventOptionsBuilder from Cryostat application
  • chore(svc): add recording start method using event template name and type

Related to cryostatio/cryostat-agent#162
Related to https://github.com/cryostatio/cryostat/issues/1578

This extracts the EventOptionsBuilder from the Cryostat application into -core, then augments the JMC IFlightRecorderService by introducing a subinterface CryostatFlightRecorderService that allows for additional/higher-level operations, such as dynamically starting a recording using an event template name+type rather than the JMC IConstrainedMap. This will support starting recordings by network request by asking the Agent to simply use a .jfc file available to it locally, rather than needing to reserialize the settings defined by that .jfc and transmit that over the network, where those settings would be originally retrieved by querying the raw .jfc form from the Agent and parsing it to create the IConstrainedMap model.

A further enhancement to come later will be to allow supplying the entire XML (.jfc) Document on the recording creation request. The CryostatFlightRecorderService implementation will either convert this to the IConstrainedMap server-side, or pass it as-is to the Agent for conversion, so that the XML content of Custom event templates does not need to be reserialized between XML, POJO, and possibly JSON in several stages along the flow.

Some serialization-related classes are also extracted (and minor refactorings done) from the Cryostat application into -core here, since they will be useful for facilitating (de)serialization of these structures for communication between Cryostat and the Agent.

@andrewazores andrewazores added the feat New feature or request label Jun 28, 2023
@andrewazores andrewazores changed the title chore(svc): add recording start method using event template name and type feat(svc): add recording start method using event template name and type Jun 28, 2023
maxcao13
maxcao13 previously approved these changes Jul 7, 2023
Copy link
Member

@maxcao13 maxcao13 left a comment

Choose a reason for hiding this comment

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

Makes sense to me, looks good!

Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

Looks good! I just have some small questions above.

@andrewazores andrewazores merged commit 15d35b5 into cryostatio:main Jul 25, 2023
5 checks passed
@andrewazores andrewazores deleted the extract-refactor-recording-start branch July 25, 2023 18:17
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
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants