A small Java library for using the JMC Flight Recorder (JFR) APIs to process and write JFR API Events.
- Roundtrip test: Read JFR file -> process -> write JFR file -> and the events are the same
- Supports all JFR features (that I can think of)
- Supports modifying events
It's the foundation of jfr-redact
<dependency>
<groupId>me.bechberger</groupId>
<artifactId>basic-jfr-processor</artifactId>
<version>0.1.2</version>
</dependency>// Create a modifier that drops events
JFREventModifier modifier = new JFREventModifier() {
@Override
public boolean shouldRemoveEvent(RecordedEvent event) {
return event.getEventType().getName().equals("example.UserLogin");
}
};
// Process the recording
JFRProcessor processor = new JFRProcessor(modifier, inputFile);
try (FileOutputStream out = new FileOutputStream(outputFile.toFile())) {
processor.process(out).close();
}See the SimpleProcessorExample.java for a complete working example.
# Run all tests
mvn testUse the included Python script to automate version bumps and releases:
# Bump minor version, run tests, build
./release.py
./release.py --patch
# Full release: bump, test, build, deploy, commit, tag, push
./release.py --deploy --push
# Dry run to see what would happen
./release.py --dry-runThis project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome.
MIT, Copyright 2026 SAP SE or an SAP affiliate company, Johannes Bechberger and contributors