2

How to configure spring-boot Micrometer @Timed annotation to write logs into some log file instead of endpoint?

Taras
  • 409
  • 4
  • 18

1 Answers1

1

To write all metrics to logs you can use the LoggingMeterRegistry. There is no autoconfiguration for this in spring boot so if you are using spring boot you will need to configure the required beans manually.

Source code: https://github.com/micrometer-metrics/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/instrument/logging/LoggingMeterRegistry.java

Michael McFadyen
  • 2,675
  • 11
  • 25