Is there a way to combine Slf4jReporter with the metrics-json package to generate JSON in logs

Is there a way to combine Slf4jReporter with the metrics-json package to generate JSON in logs?

 reporter = Slf4jReporter.forRegistry(registry) .outputTo(logger) .convertRatesTo(TimeUnit.SECONDS) .convertDurationsTo(TimeUnit.MILLISECONDS) .build(); 

Is there any example of registering a json metric with a reporter / registrar.

+6
source share

All Articles