JFR Servlet

A Servlet Filter that generates JFR events.

License

License

MIT
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

jfr-servlet
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

JFR Servlet
A Servlet Filter that generates JFR events.
Project URL

Project URL

https://github.com/marschall/jfr-servlet
Source Code Management

Source Code Management

https://github.com/marschall/jfr-servlet

Download jfr-servlet

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marschall/jfr-servlet/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>jfr-servlet</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/jfr-servlet/
implementation 'com.github.marschall:jfr-servlet:0.1.2'
// https://jarcasting.com/artifacts/com.github.marschall/jfr-servlet/
implementation ("com.github.marschall:jfr-servlet:0.1.2")
'com.github.marschall:jfr-servlet:jar:0.1.2'
<dependency org="com.github.marschall" name="jfr-servlet" rev="0.1.2">
  <artifact name="jfr-servlet" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='jfr-servlet', version='0.1.2')
)
libraryDependencies += "com.github.marschall" % "jfr-servlet" % "0.1.2"
[com.github.marschall/jfr-servlet "0.1.2"]

Dependencies

provided (1)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 4.0.1

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar 5.4.2
org.springframework : spring-test jar 5.1.8.RELEASE

Project Modules

There are no modules declared in this project.

JFR Servlet Maven Central Javadocs Build Status

A servlet filter that generates JFR events.

<dependency>
  <groupId>com.github.marschall</groupId>
  <artifactId>jfr-servlet</artifactId>
  <version>0.1.2</version>
</dependency>

Flight Recording of some HTTP requests

This project requires Java 11.

Usage

If your web application is not metadata-complete 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.

<filter>
  <filter-name>JfrFilter</filter-name>
  <filter-class>com.github.marschall.jfr.servlet.JfrFilter</filter-class>
  <async-supported>true</async-supported>
</filter>

<filter-mapping>
  <filter-name>JfrFilter</filter-name>
  <url-pattern>/*</url-pattern>
  <dispatcher>REQUEST</dispatcher>
  <dispatcher>FORWARD</dispatcher>
  <dispatcher>INCLUDE</dispatcher>
  <dispatcher>ERROR</dispatcher>
  <dispatcher>ASYNC</dispatcher>
</filter-mapping>

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.

Versions

Version
0.1.2
0.1.0