-
Notifications
You must be signed in to change notification settings - Fork 10
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(eventtemplates): add Preset event templates type and Quarkus-specific preset #733
Conversation
New feature: The target's JFR event types can be queried in match expressions. This should be particularly useful for Automated Rules combined with Preset Event Templates - Rules can be created which apply to targets based on the presence of registered JFR event types in the JVM, rather than only discovery-related attributes. The expression shown in this screenshot ( This requires the match expression evaluator to query the target for its event types, which may require a new connection to be opened to that target if none is already open in the connection manager cache, so this will slow down expression evaluations. However, the registered event types can be assumed to be static data, so the existing evaluator cache layer ( This would fit in nicely with #727 , as well as older ideas (can't find issue references now) to ship Cryostat with some pre-defined Automated Rules definitions. We could ship a Quarkus Preset Event Template, plus an Automated Rule that checks for |
With the cleanup in the latest commit, the required expression becomes slightly different: |
I will split this out into a separate PR for ease of review and changeset management. |
ed38823
to
5f50c5c
Compare
/build_test |
Workflow started at 12/6/2024, 3:14:16 PM. View Actions Run. |
CI build and push: At least one test failed ❌ |
Ah, CI failed because of the |
2180348
to
cde8901
Compare
This PR/issue depends on:
|
/build_test |
Workflow started at 12/19/2024, 11:21:33 AM. View Actions Run. |
No GraphQL schema changes detected. |
No OpenAPI schema changes detected. |
CI build and push: All tests pass ✅ |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Depends on cryostatio/cryostat-core#486
Related to #548
See quarkusio/quarkus#44976 for disabled tests
Description of the change:
Adds a new
PRESET
event template type. These are intended to be readonly.jfc
files that ship with Cryostat (included in the source repository or layered on top of the container at build time). This is somewhat similar to declarative (custom) event templates, but with the distinction that custom event templates can be created and deleted by the user at runtime. Preset templates are runtime immutable and are intended to do things like ship customized preset templates suggested by the Cryostat authors or community, or to enable support for popular application frameworks.The first pass of this contained two different presets:
Quarkus_Continuous
andQuarkus_Profiling
. These were based on the default continuous/profiling.jfc
files shipped with OpenJDK 21, with the Quarkus-specific events enabled additionally. The latest revision of this PR includes a single tinyQuarkus
preset template, which only enables the Quarkus-specific event types. In this latest revision the intent is that the user can use the preset to enable those particular events, and can achieve a layered effect by starting a second (or nth) recording using another target or custom event template. If the user wants to be able to do this with one recording in the future, then they can download the preset and use it as a basis to create their own custom template that enables all of the events in one go.How to manually test:
src/main/webui
, check out related-core
PR and./mvnw clean install
it./smoketest.bash -O
Quarkus
template appears.quarkus
. Three event types should appear.jfr print --events 'quarkus.*' quarkus.jfr
and ensure that Quarkus events are present in the recordingjfr print --events 'quarkus.*' continuous.jfr
and ensure that Quarkus events are present in this recording toojfr summary quarkus.jfr
and ensure that other JDK events are also present in the recordingand