https://github.com/marschall/jfr-resttemplate
a RestTemplate that generates JFR events
https://github.com/marschall/jfr-resttemplate
java java-flight-recorder spring-resttemplate
Last synced: 3 months ago
JSON representation
a RestTemplate that generates JFR events
- Host: GitHub
- URL: https://github.com/marschall/jfr-resttemplate
- Owner: marschall
- Created: 2019-06-07T13:04:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T21:53:25.000Z (3 months ago)
- Last Synced: 2025-03-01T22:26:12.626Z (3 months ago)
- Topics: java, java-flight-recorder, spring-resttemplate
- Language: Java
- Size: 514 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
JfrRestTemplate [](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/jfr-resttemplate) [](https://www.javadoc.io/doc/com.github.marschall/jfr-resttemplate)
===============An implementation of Spring [RestTemplate](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html) that generates [Flight Recorder](https://openjdk.java.net/jeps/328) events.

Versions 2.x are for Spring 6, versions 1.x are for Spring 5.
```xml
com.github.marschall
jfr-resttemplate
2.0.0```
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
-----```java
@Configuration
public class RestConfiguration {@Bean
public RestOperations restOperations() {
ClientHttpRequestFactory requestFactory = ...;
RestOperations restOperations = new RestTemplate(requestFactory);
return new JfrRestOperations(restOperations);
}}
```