JFR Catalina

A Catalina Valve that generates JFR events.

License

License

MIT
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

catalina-jfr
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

JFR Catalina
A Catalina Valve that generates JFR events.
Project URL

Project URL

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

Source Code Management

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

Download catalina-jfr

How to add to project

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

Dependencies

provided (1)

Group / Artifact Type Version
org.apache.tomcat : tomcat-catalina jar 9.0.21

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar 5.4.2
org.hamcrest : hamcrest-junit jar 2.0.0.0

Project Modules

There are no modules declared in this project.

Catalina JFR

A Catalina valve that generates Flight Recorder events. Unlike a filter based approach a valve based approach also generate events for internal servlets like the DefaultServlet and JasperServlet.

Flight Recording of some HTTP requests

This project requires Java 11.

Usage

Copy the jar to ${tomcat.home}/lib and add the following valve to server.xml.

        <Valve className="com.github.marschall.catalina.jfr.JfrValve" />

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.0