https://github.com/marschall/jfr-servlet
a servlet filter that generates JFR events
https://github.com/marschall/jfr-servlet
java java-flight-recorder servlet-filter
Last synced: 3 months ago
JSON representation
a servlet filter that generates JFR events
- Host: GitHub
- URL: https://github.com/marschall/jfr-servlet
- Owner: marschall
- Created: 2019-05-15T07:25:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T21:20:25.000Z (3 months ago)
- Last Synced: 2025-03-01T22:22:50.480Z (3 months ago)
- Topics: java, java-flight-recorder, servlet-filter
- Language: Java
- Size: 118 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
JFR Servlet [](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/jfr-servlet) [](https://www.javadoc.io/doc/com.github.marschall/jfr-servlet)
===========A servlet filter that generates [JFR](https://openjdk.java.net/jeps/328) events.
```xml
com.github.marschall
jfr-servlet
2.0.0```

This project requires Java 11.
Versions 1.x are for the `javax.servlet` namespace, versions 2.x are for the `jakarta.servlet` namespace.
Usage
-----If your web application is not [metadata-complete](https://www.oracle.com/technetwork/articles/javaee/javaee6overview-part2-136353.html) then you only need to add the dependency.
If your web application is `metadata-complete` then you manually need to add the filter `com.github.marschall.jfr.servlet.JfrFilter` and map it.
```xml
JfrFilter
com.github.marschall.jfr.servlet.JfrFilter
trueJfrFilter
/*
REQUEST
FORWARD
INCLUDE
ERROR
ASYNC```
Correlating Dispatches
----------------------A single request may traverse the servlet chain multiple times, either because of a server side redirect or because of asynchronous processing. We generate a unique exchangeId for every request so that multiple dispatches of the same request can be correlated.