An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

JFR Servlet [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/jfr-servlet/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/jfr-servlet) [![Javadocs](https://www.javadoc.io/badge/com.github.marschall/jfr-servlet.svg)](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

```

![Flight Recording of some HTTP requests](https://github.com/marschall/jfr-servlet/raw/master/src/main/javadoc/Screenshot.png)

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
true

JfrFilter
/*
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.