Skip to content

Commit 4306f56

Browse files
committed
document recordings
1 parent f8b589b commit 4306f56

11 files changed

+281
-16
lines changed

schema/openapi.yaml

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ paths:
722722
description: Not Allowed
723723
security:
724724
- SecurityScheme: []
725+
summary: List all archived recordings grouped by target
725726
tags:
726727
- Archived Recordings
727728
/api/beta/fs/recordings/{jvmId}:
@@ -747,6 +748,7 @@ paths:
747748
description: Not Allowed
748749
security:
749750
- SecurityScheme: []
751+
summary: List all archived recordings belonging to the specified target
750752
tags:
751753
- Archived Recordings
752754
/api/beta/fs/recordings/{jvmId}/{filename}:
@@ -771,12 +773,14 @@ paths:
771773
description: Not Allowed
772774
security:
773775
- SecurityScheme: []
776+
summary: Delete an archived recording by name belonging to the specified target
774777
tags:
775778
- Archived Recordings
776779
/api/beta/recordings/{connectUrl}/{filename}:
777780
delete:
778781
parameters:
779-
- in: path
782+
- description: the connection URL associated with the target
783+
in: path
780784
name: connectUrl
781785
required: true
782786
schema:
@@ -795,6 +799,7 @@ paths:
795799
description: Not Allowed
796800
security:
797801
- SecurityScheme: []
802+
summary: Delete an archived recording belonging to the specified target
798803
tags:
799804
- Archived Recordings
800805
/api/beta/recordings/{jvmId}:
@@ -820,9 +825,13 @@ paths:
820825
description: Not Allowed
821826
security:
822827
- SecurityScheme: []
828+
summary: List archived recordings belonging to the specified target
823829
tags:
824830
- Archived Recordings
825831
post:
832+
description: |
833+
Upload a JFR binary file into the archives, associating the archived recording with a particular
834+
target JVM. This is primarily used by the Cryostat Agent for pushing harvested recording files.
826835
parameters:
827836
- in: path
828837
name: jvmId
@@ -851,6 +860,7 @@ paths:
851860
description: Not Allowed
852861
security:
853862
- SecurityScheme: []
863+
summary: Upload a JFR binary file to archives, associated with a particular target
854864
tags:
855865
- Archived Recordings
856866
/api/v4.1/metrics/reports:
@@ -952,6 +962,11 @@ paths:
952962
- Reports
953963
/api/v4/activedownload/{id}:
954964
get:
965+
description: |
966+
Given a recording ID and a remote recording ID within that target, Cryostat will open a remote
967+
connection to the target and pipe back a data stream containing the Flight Recording binary file
968+
format for that recording. The client can feed this data to other tooling which ingests the JFR
969+
binary file format.
955970
parameters:
956971
- in: path
957972
name: id
@@ -973,6 +988,7 @@ paths:
973988
description: Not Allowed
974989
security:
975990
- SecurityScheme: []
991+
summary: Download a Flight Recording binary file
976992
tags:
977993
- Active Recordings Download
978994
/api/v4/auth:
@@ -1305,6 +1321,9 @@ paths:
13051321
- Discovery
13061322
/api/v4/download/{encodedKey}:
13071323
get:
1324+
description: |
1325+
Get a download URL for an archived recording. The response will be an HTTP redirect with a Location
1326+
header pointing to the location where the client can download the recording JFR binary file.
13081327
parameters:
13091328
- in: path
13101329
name: encodedKey
@@ -1327,6 +1346,7 @@ paths:
13271346
description: Not Allowed
13281347
security:
13291348
- SecurityScheme: []
1349+
summary: Get a download URL for an archived recording
13301350
tags:
13311351
- Archived Recordings
13321352
/api/v4/event_templates:
@@ -1463,6 +1483,9 @@ paths:
14631483
- Event Templates
14641484
/api/v4/grafana/{encodedKey}:
14651485
post:
1486+
description: |
1487+
Upload an archived recording to the jfr-datasource for later online analysis in the associated
1488+
Grafana dashboard.
14661489
parameters:
14671490
- in: path
14681491
name: encodedKey
@@ -1487,6 +1510,7 @@ paths:
14871510
description: Not Allowed
14881511
security:
14891512
- SecurityScheme: []
1513+
summary: Upload an archived recording to Grafana for online analysis
14901514
tags:
14911515
- Archived Recordings
14921516
/api/v4/grafana_dashboard_url:
@@ -1664,6 +1688,8 @@ paths:
16641688
- JMC Agent Templates
16651689
/api/v4/recordings:
16661690
get:
1691+
description: |
1692+
List all archived recordings from all targets, including (re-)uploaded files.
16671693
responses:
16681694
"200":
16691695
content:
@@ -1679,9 +1705,15 @@ paths:
16791705
description: Not Allowed
16801706
security:
16811707
- SecurityScheme: []
1708+
summary: List all archived recordings
16821709
tags:
16831710
- Archived Recordings
16841711
post:
1712+
description: |
1713+
(Re-)upload a JFR binary file into the archives. This allows for the restoration of archived files
1714+
after they have been otherwise removed, or for portability across Cryostat instances or between
1715+
Cryostat version upgrades. This can also be used to upload JFR files which were not collected by
1716+
Cryostat, so that Cryostat can be used to perform online analysis of the file.
16851717
requestBody:
16861718
content:
16871719
application/x-www-form-urlencoded:
@@ -1706,10 +1738,12 @@ paths:
17061738
description: Not Allowed
17071739
security:
17081740
- SecurityScheme: []
1741+
summary: Upload a JFR binary file to archives
17091742
tags:
17101743
- Archived Recordings
17111744
/api/v4/recordings/{filename}:
17121745
delete:
1746+
deprecated: true
17131747
parameters:
17141748
- in: path
17151749
name: filename
@@ -1725,6 +1759,7 @@ paths:
17251759
description: Not Allowed
17261760
security:
17271761
- SecurityScheme: []
1762+
summary: Delete an archived recording by filename
17281763
tags:
17291764
- Archived Recordings
17301765
/api/v4/reports/{encodedKey}:
@@ -2223,6 +2258,8 @@ paths:
22232258
- JMC Agent Probes
22242259
/api/v4/targets/{targetId}/recordingOptions:
22252260
get:
2261+
description: |
2262+
Retrieve a map of the current options for the specified target.
22262263
parameters:
22272264
- in: path
22282265
name: targetId
@@ -2244,9 +2281,14 @@ paths:
22442281
description: Not Allowed
22452282
security:
22462283
- SecurityScheme: []
2284+
summary: Get the current set of options for the specified target
22472285
tags:
22482286
- Recording Options
22492287
patch:
2288+
description: |
2289+
Set default recording options for the specified target. These options will be applied to any
2290+
recordings started on this target if no override values are specified when the recording is
2291+
created.
22502292
parameters:
22512293
- in: path
22522294
name: targetId
@@ -2280,10 +2322,14 @@ paths:
22802322
description: Not Allowed
22812323
security:
22822324
- SecurityScheme: []
2325+
summary: Update the recording options for the specified target
22832326
tags:
22842327
- Recording Options
22852328
/api/v4/targets/{targetId}/recordings:
22862329
get:
2330+
description: |
2331+
Retrieve a list of active recordings currently present on the specified target. This may initiate
2332+
a new remote connection to the target to update Cryostat's model of available recordings.
22872333
parameters:
22882334
- in: path
22892335
name: targetId
@@ -2306,9 +2352,17 @@ paths:
23062352
description: Not Allowed
23072353
security:
23082354
- SecurityScheme: []
2355+
summary: List active recordings on the specified target
23092356
tags:
23102357
- Active Recordings
23112358
post:
2359+
description: |
2360+
Create a new Flight Recording on the specified target. The recording will be immediately started
2361+
and begin capturing Flight Recording data.
2362+
The recording must be given a name (unique within the
2363+
target). An event specifier string must be included, which follows the format
2364+
"template={name},(type={type})". The type parameter is optional and the template name is required.
2365+
See the Event Templates API for more information about the values that can be used here.
23122366
parameters:
23132367
- in: path
23142368
name: targetId
@@ -2367,10 +2421,14 @@ paths:
23672421
description: Not Allowed
23682422
security:
23692423
- SecurityScheme: []
2424+
summary: Start a new recording on the specified target
23702425
tags:
23712426
- Active Recordings
23722427
/api/v4/targets/{targetId}/recordings/{remoteId}:
23732428
delete:
2429+
description: |
2430+
Delete a recording from the specified target. This will remove it both from Cryostat's database
2431+
as well as remove the recording and release all resources in the remote target JVM.
23742432
parameters:
23752433
- in: path
23762434
name: remoteId
@@ -2393,9 +2451,15 @@ paths:
23932451
description: Not Allowed
23942452
security:
23952453
- SecurityScheme: []
2454+
summary: Delete a recording from the specified target
23962455
tags:
23972456
- Active Recordings
23982457
get:
2458+
description: |
2459+
Given a recording ID and a remote recording ID within that target, Cryostat will open a remote
2460+
connection to the target and pipe back a data stream containing the Flight Recording binary file
2461+
format for that recording. The client can feed this data to other tooling which ingests the JFR
2462+
binary file format.
23992463
parameters:
24002464
- in: path
24012465
name: remoteId
@@ -2423,9 +2487,13 @@ paths:
24232487
description: Not Allowed
24242488
security:
24252489
- SecurityScheme: []
2490+
summary: Download a Flight Recording binary file
24262491
tags:
24272492
- Active Recordings
24282493
patch:
2494+
description: |
2495+
Remote recordings can be stopped by sending the request body "stop", or copied to archives by
2496+
sending the request body "save". The body is case-insensitive.
24292497
parameters:
24302498
- in: path
24312499
name: remoteId
@@ -2457,10 +2525,14 @@ paths:
24572525
description: Not Allowed
24582526
security:
24592527
- SecurityScheme: []
2528+
summary: Update a remote recording on the specified target
24602529
tags:
24612530
- Active Recordings
24622531
/api/v4/targets/{targetId}/recordings/{remoteId}/upload:
24632532
post:
2533+
description: |
2534+
Upload the current data stream of the specified recording to the jfr-datasource for online analysis
2535+
in the associated Grafana dashboard.
24642536
parameters:
24652537
- in: path
24662538
name: remoteId
@@ -2492,6 +2564,7 @@ paths:
24922564
description: Not Allowed
24932565
security:
24942566
- SecurityScheme: []
2567+
summary: Upload a recording for analysis in Grafana dashboard
24952568
tags:
24962569
- Active Recordings
24972570
/api/v4/targets/{targetId}/reports/{recordingId}:
@@ -2547,6 +2620,7 @@ paths:
25472620
description: Not Allowed
25482621
security:
25492622
- SecurityScheme: []
2623+
summary: Create a JFR Snapshot on the specified target
25502624
tags:
25512625
- Snapshots
25522626
/api/v4/tls/certs:

src/main/java/io/cryostat/jmcagent/S3ProbeTemplateService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
/**
5959
* Implementation for JMC Agent event probe templates stored in S3 object storage.
60+
*
6061
* @see io.cryostat.events.S3TemplateService
6162
*/
6263
public class S3ProbeTemplateService implements ProbeTemplateService {

src/main/java/io/cryostat/recordings/ActiveRecording.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
import org.hibernate.type.SqlTypes;
5353
import org.jboss.logging.Logger;
5454

55+
/**
56+
* Represents a Flight Recording currently present on a remote @{link io.cryostat.target.Target}
57+
* JVM. This Recording may be in any state, but should actually be present on the remote Target. It
58+
* may have been created by Cryostat, by another external tool, or by the target JVM itself.
59+
*/
5560
@Entity
5661
@EntityListeners(ActiveRecording.Listener.class)
5762
@Table(

0 commit comments

Comments
 (0)