Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to organize JFR data with recording labels in Cryostat 2.1

May 12, 2022
Janelle Law
Related topics:
ContainersJavaKubernetes
Related products:
Red Hat OpenShift Container Platform

Share:

    With the tech preview release of Cryostat 2.1, users can attach metadata or custom labels to JDK flight recordings that monitor containerized Java applications, and can manage those recordings using Cryostat. Recording labels can identify recordings in queries and perform actions on multiple recordings containing the same label. This article shows how to add and edit metadata labels on your JDK flight recordings, including the recordings managed through automated rules.

    Add a recording label to a JDK flight recording

    Navigate to the Recordings tab on the Cryostat console and select a target JVM from the drop-down menu. Click Create to create a custom flight recording (Figure 1). When creating the flight recording, expand the Show metadata options form section. Click Add Label to add a key-value label pair to the recording. For more details about creating recordings, see the Cryostat guides.

    A custom flight recording can be tracked through custom labels.
    Figure 1: A custom flight recording can be tracked through custom labels.

    The new recording will appear in the Recordings tab with your custom label, along with default labels containing information about the selected recording template, as shown in Figure 2.

    The Active Recordings table shows the labels on each recording.
    Figure 2: The Active Recordings table shows the labels on each recording.

    Edit recording labels for a JDK flight recording

    Recording labels can also be edited after recordings have been created or re-uploaded to archives. For instance, it looks like the custom label in our example contains a typo. You can fix it by editing the label.

    Click the ellipsis menu beside the recording table entry, then click Edit Metadata. The labels section will appear as a form where you can add, edit, or delete existing labels. Click Save to save your edited labels, as shown in Figure 3.

    The value of a label has been edited.
    Figure 3: The value of a label has been edited.

    The recording labels should now be updated in the Active Recordings table, as shown in Figure 4.

    The Active Recordings table shows the updated labels.
    Figure 4: The Active Recordings table shows the updated labels.

    On the Active Recordings table, click the checkbox next to the recording, then click Archive to archive your recording.

    The archived recording also copies the labels from the active recording, as shown in Figure 5. This means you can easily find the archived recordings associated with an active recording by searching for the metadata labels applied to the active recording. You can also add additional labels to any recording uploaded to the Cryostat archives. The labels are preserved for as long as the recording remains in the archives.

    Labels are also shown for each recording in the Archived Recordings tab.
    Figure 5: Labels are also shown for each recording in the Archived Recordings tab.

    Labeling recordings generated with automated rules

    Automated rules, introduced in the article How to build automated JFR rules with Cryostat 2.1, simplify the tracking and management of multiple JDK flight recordings. An automated rule automatically applies a metadata label to indicate the name of the automated rule that created that recording. For example, if your automated rule was named my_automated_rule, all recordings generated with that rule will contain the metadata label Rule: my_automated_rule. When these recordings are archived, the labels are preserved to help you easily locate all of your recordings generated by my_automated_rule.

    Conclusion

    This article has explained how to add and edit recording metadata labels for a single JDK flight recording, or for multiple recordings if they are managed by an automated rule. Automated rules also apply metadata labels to each recording they create.

    To search for and operate on recordings using these labels, check out another article in this series, Manage JFR across instances with Cryostat and GraphQL. For more information about Cryostat, visit the project's getting started page. For questions, comments and feedback, feel free to connect with us on GitHub or join our mailing list.

    Last updated: September 20, 2023

    Related Posts

    • How to log into Cryostat 2.1 on OpenShift: SSO for all

    Recent Posts

    • Kafka Monthly Digest: September 2025

    • A more secure way to handle secrets in OpenShift

    • How to deploy MCP servers on OpenShift using ToolHive

    • How to change the meaning of python and python3 on RHEL

    • vLLM or llama.cpp: Choosing the right LLM inference engine for your use case

    What’s up next?

    book cover

    The microservice architectural approach is more than just about technology: It reaches into the foundation of your organization to allow you to build truly scalable, adaptive, complex systems that help a business adapt to rapidly changing competitive markets. In Microservices for Java Developers, you'll get a hands-on introduction to frameworks and containers through a handful of familiar patterns.

    get the free ebook
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue