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(preset): add preset template and rule for Hibernate JFR #750

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

andrewazores
Copy link
Member

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Fixes: #736
See also #548
Depends on #749
Based on #749

Description of the change:

Adds a Preset Event Template for Hibernate JFR events, which are enabled by the hibernate-jfr dependency. Any application using Hibernate which also has this JAR on its classpath should have the relevant JFR event types registered, and they can be emitted simply by starting a recording with them enabled. Also adds an Automated Rule which detects the presence of these event types in the target JVM, for ease of enablement by the end user.

Motivation for the change:

Provides a quick and easy way for Cryostat + Hibernate users to get very detailed profiling information about the internals of their Hibernate sessions, transactions, etc. - simply install the hibernate-jfr dependency, redeploy the target application, and turn on the preset Automated Rule for Hibernate.

How to manually test:

  1. Check out and build PR
  2. ./smoketest.bash -O
  3. Open Web UI
  4. Go to Automated Rules view
  5. Enable the Hibernate rule
  6. An auto_hibernate recording should be started in Cryostat. Click around the UI a bunch to generate load, then download the recording. jfr print --events 'org.hibernate.orm.*' auto_hibernate.jfr should reveal lots of JFR data.

@github-actions github-actions bot added needs-triage Needs thorough attention from code reviewers dependent labels Dec 20, 2024
Copy link

This PR/issue depends on:

@andrewazores andrewazores added feat New feature or request safe-to-test and removed needs-triage Needs thorough attention from code reviewers labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependent feat New feature or request safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] Support Hibernate ORM JFR events
1 participant