Class LoggingMetrics
java.lang.Object
ch.admin.bag.covidcertificate.log.metrics.LoggingMetrics
Records logging metrics using a
Is initialized after the application has successfully started to avoid race conditions in auto config initialization between micrometer and logging. Does not statically link to micrometer to avoid a hard dependency on micrometer.
Buffers counter increments locally until a metrics provider has been initialized to avoid losing counters when micrometer is not yet initialized.
LoggingMetricsProvider (using Micrometer if available, otherwise NOP)
Is initialized after the application has successfully started to avoid race conditions in auto config initialization between micrometer and logging. Does not statically link to micrometer to avoid a hard dependency on micrometer.
Buffers counter increments locally until a metrics provider has been initialized to avoid losing counters when micrometer is not yet initialized.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddistributedLogTransmitTime(Duration duration) static voidstatic voidstatic voidstatic voidstatic voidvoidonApplicationStartedEvent(org.springframework.boot.context.event.ApplicationStartedEvent event)
-
Constructor Details
-
LoggingMetrics
public LoggingMetrics()
-
-
Method Details
-
onApplicationStartedEvent
@EventListener public void onApplicationStartedEvent(org.springframework.boot.context.event.ApplicationStartedEvent event) -
incrementAsyncBufferFullFallback
public static void incrementAsyncBufferFullFallback() -
incrementDistributedLogConnectionEstablished
public static void incrementDistributedLogConnectionEstablished() -
incrementDistributedLogConnectionError
public static void incrementDistributedLogConnectionError() -
incrementDistributedLogTransmitError
public static void incrementDistributedLogTransmitError() -
incrementDistributedLogFallback
public static void incrementDistributedLogFallback() -
distributedLogTransmitTime
-