A Micrometer meter registry that generates JFR events.
Metrics.addRegistry(new JfrMeterRegistry());<dependency>
<groupId>com.github.marschall</groupId>
<artifactId>micrometer-jfr</artifactId>
<version>1.16.1</version>
</dependency>- Converts tags (key value pairs) into JFR event attributes.
- Basic mapping from some
io.micrometer.core.instrument.binder.BaseUnitstojdk.jfr.ContentType. - Maps
Id#getName()andId#getDescription()to@Nameand@Description. - Stacktraces are disabled for all events for reduced overhead.
- Generates a JFR event for every metered value.
- A custom naming convention is used to translate tag names to capitalized words.
- The built in duration of most events is 0 instead a new attribute "Metered Duration" is added.
The frequency of polled meters like FunctionCounter have to be configured in a .jfc file.
<event name="my.fcounter">
<setting name="enabled">true</setting>
<setting name="period">5 s</setting>
</event>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.
