Class RouteDefinitionMetrics

java.lang.Object
org.springframework.cloud.gateway.route.RouteDefinitionMetrics
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<RefreshRoutesEvent>

public class RouteDefinitionMetrics extends Object implements org.springframework.context.ApplicationListener<RefreshRoutesEvent>
A metric to track the number of routes definitions on the gateway.
Author:
Fredrich Ombico
  • Constructor Details

    • RouteDefinitionMetrics

      public RouteDefinitionMetrics(io.micrometer.core.instrument.MeterRegistry meterRegistry, RouteDefinitionLocator routeLocator, String metricsPrefix)
  • Method Details

    • getMetricsPrefix

      public String getMetricsPrefix()
    • onApplicationEvent

      public void onApplicationEvent(RefreshRoutesEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<RefreshRoutesEvent>