Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 4. Labels for JFR recordings

download PDF

When you create a JDK Flight Recorder (JFR) recording on Cryostat 2.4, you can add metadata to the recording by specifying a series of key-value label pairs.

Additionally, you can attach custom labels to JFR recordings that are inside a target JVM, so that you can easily identify and better manage your JFR recordings.

The following list details some common recording label use cases:

  • Attach metadata to your JFR recording.
  • Perform batch operations on recordings that contain identical labels.
  • Use labels when running queries on recordings.

You can use Cryostat to create a JFR recording that monitors the performance of your JVM in your containerized application. Additionally, you can take a snapshot of an active JFR recording to capture any collected data, up to a specific point in time, for your target JVM application.

4.1. Adding labels to JFR recordings

When you create a JFR recording on Cryostat 2.4, you can use labels to add metadata that contain key-value label pairs to the recording.

Cryostat applies default recording labels to a created JFR recording. These default labels capture information about the event template that Cryostat used to create the JFR recording.

You can add custom labels to your JFR recording so that you can run specific queries that meet your needs, such as identifying specific JFR recordings or performing batch operations on recordings with the same applied labels.

Prerequisites

  • Logged in to your Cryostat web console.
  • Created or selected a target JVM for your Cryostat instance.

Procedure

  1. From your Cryostat web console, click Recordings.
  2. Under the Active Recordings tab, click Create.
  3. On the Custom Flight Recording tab, expand Show metadata options.

    Note

    On the Custom Flight Recording tab, you must complete any mandatory field that is marked with an asterisk.

  4. Click Add label.

    Figure 4.1. The Add Label button that is displayed under the Custom Flight Recording tab

    The *Add Label* button that is shown on the *Custom Flight Recording* tab
  5. Enter values in the provided Key and Value fields. For example, if you want to file an issue with the recordings, you could enter the reason in the Key field and then enter the issue type in the Value field.
  6. Click Create to create your JFR recording. Your recording is then shown under the Active Recordings tab along with any specified recording labels and custom labels.

    Tip

    You can access archived JFR recordings from the Archives menu. See Uploading a JFR recording to Cryostat archives location (Using Cryostat to manage a JFR recording).

Example

The following example shows two default recording labels, template.name: Profiling and template.type: TARGET, and one custom label, reason:service-outage.

Figure 4.2. Example of an active recording with defined recording labels and a custom label

Example of an active recording with defined recording labels and a custom label

4.2. Editing a label for your JFR recording

On the Cryostat web console, you can navigate to the Recordings menu and then edit a label and its metadata for your JFR recording. You can also edit the label and metadata for a JFR recording that you uploaded to archives.

Prerequisites

  • Logged in to your Cryostat web console.
  • Created a JFR recording and attach labels to this recording.

Procedure

  1. On your Cryostat web console, click the Recording menu.
  2. From the Active Recordings tab, locate your JFR recording, and then select the checkbox next to it.
  3. Click Edit Labels. An Edit Recording Label pane opens in your Cryostat web console, which you can use to add, edit, or delete labels for your JFR recording.

    Tip

    You can select multiple JFR recordings by selecting the checkbox that is next to each recording. Click the Edit Labels button if you want to bulk edit recordings that contain the same labels or add new identical labels to multiple recordings.

  4. Optional: You can perform any of the following actions from the Edit Recording Labels pane:

    1. Click Add to create a label.
    2. Delete a label by clicking the X next to the label.
    3. Edit a label by modifying any content in a field. After you edit content, a green tick is shown in the field to indicate an edit.
  5. Click Save.
  6. Optional: You can archive your JFR recordings along with their labels by completing the following steps:

    1. Select the checkbox next to the recording’s name.
    2. Click the Archive button. You can locate your recording under the Archived Recordings tab.

      By archiving your recording with its labels, you can enhance your search capabilities when you want to locate the recording at a later stage. You can also add additional labels to any recording that you uploaded to the Cryostat archives.

      Note

      Cryostat preserves any labels with the recording for the lifetime of the archived recording.

Verification

  • From the Active Recordings tab, check that your changes display under the Labels section for your recording.

Revised on 2023-12-12 17:44:20 UTC

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.