JFR RestTemplate

A RestTemplate that generates JFR events.

License

License

MIT
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

jfr-resttemplate
Last Version

Last Version

0.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

JFR RestTemplate
A RestTemplate that generates JFR events.
Project URL

Project URL

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

Source Code Management

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

Download jfr-resttemplate

How to add to project

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

Dependencies

provided (1)

Group / Artifact Type Version
org.springframework : spring-web jar

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar
org.junit.jupiter : junit-jupiter-engine jar

Project Modules

There are no modules declared in this project.

JfrRestTemplate Maven Central Javadocs

An implementation of Spring RestTemplate that generates Flight Recorder events.

Flight Recording of some HTTP requests

<dependency>
  <groupId>com.github.marschall</groupId>
  <artifactId>jfr-resttemplate</artifactId>
  <version>0.2.1</version>
</dependency>

This project requires Java 11 based on OpenJDK or later.

Overhead

We try to keep overhead to a minimum and the only additional allocations besides the JFR events are URI#toString().

Usage

@Configuration
public class RestConfiguration {

   @Bean
   public RestOperations restOperations() {
     ClientHttpRequestFactory requestFactory = ...;
     RestOperations restOperations = new RestTemplate(requestFactory);
     return new JfrRestOperations(restOperations);
   }

}

Versions

Version
0.2.1
0.2.0
0.1.0