https://github.com/marschall/micrometer-jfr
A Micrometer meter registry that generates JFR events
https://github.com/marschall/micrometer-jfr
java-flight-recorder jdk-flight-recorder micrometer
Last synced: about 1 month ago
JSON representation
A Micrometer meter registry that generates JFR events
- Host: GitHub
- URL: https://github.com/marschall/micrometer-jfr
- Owner: marschall
- Created: 2020-09-20T18:29:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T21:58:35.000Z (3 months ago)
- Last Synced: 2025-03-27T02:43:14.391Z (about 2 months ago)
- Topics: java-flight-recorder, jdk-flight-recorder, micrometer
- Language: Java
- Homepage:
- Size: 330 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Micrometer JFR [](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/micrometer-jfr) [](https://www.javadoc.io/doc/com.github.marschall/micrometer-jfr)
==============A [Micrometer](https://micrometer.io/) meter registry that generates [JFR](https://openjdk.java.net/jeps/328) events.
Usage
-----```java
Metrics.addRegistry(new JfrMeterRegistry());
``````xml
com.github.marschall
micrometer-jfr
1.13.0```

Features
--------- Converts tags (key value pairs) into JFR event attributes.
- Basic mapping from some `io.micrometer.core.instrument.binder.BaseUnits` to `jdk.jfr.ContentType`.
- Maps `Id#getName()` and `Id#getDescription()` to `@Name` and `@Description`.
- Stacktraces are disabled for all events for reduced overhead.
- Generates a JFR event for every metered value.
- A custom [naming convention](https://docs.micrometer.io/micrometer/reference/concepts/naming.html) is used to translate tag names to capitalized words.Limitations
------------ The built in duration of most events is 0 instead a new attribute "Metered Duration" is added.
Configuration
-------------The frequency of polled meters like `FunctionCounter` have to be configured in a `.jfc` file.
```xml
true
5 s```
Compliance
----------We do not pass all tests in `MeterRegistryCompatibilityKit`. The main issue is that we do not implement histograms for `Timer`, `LongTaskTimer` and `DistributionSummary`. Instead we always generate a JFR event and let the consumer process and aggregate as desired.
In addition we do not support `PauseDetector` in `Timer`, we recommend you generate JFR events should the existing ones not be sufficient.