Skip to content

Commit

Permalink
passed the startSnapshot method to getSnapshotRecording()
Browse files Browse the repository at this point in the history
  • Loading branch information
aali309 committed Aug 28, 2023
1 parent f6341dc commit 783b5cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/io/cryostat/net/AgentJFRService.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,11 @@ public List<String> getServerTemplates() throws FlightRecorderException {

@Override
public IRecordingDescriptor getSnapshotRecording() throws FlightRecorderException {
throw new UnimplementedException();
try {
return client.startSnapshot().toCompletionStage().toCompletableFuture().get();
} catch (ExecutionException | InterruptedException e) {
throw new FlightRecorderException("Failed to creat snapshot recording");
}
}

@Override
Expand Down

0 comments on commit 783b5cf

Please sign in to comment.