Class GatewayMetricsFilter
- java.lang.Object
-
- org.springframework.cloud.gateway.filter.GatewayMetricsFilter
-
- All Implemented Interfaces:
GlobalFilter,org.springframework.core.Ordered
public class GatewayMetricsFilter extends Object implements GlobalFilter, org.springframework.core.Ordered
- Author:
- Tony Clarke, Ingyu Hwang
-
-
Constructor Summary
Constructors Constructor Description GatewayMetricsFilter(io.micrometer.core.instrument.MeterRegistry meterRegistry, List<GatewayTagsProvider> tagsProviders, String metricsPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)Process the Web request and (optionally) delegate to the nextGatewayFilterthrough the givenGatewayFilterChain.StringgetMetricsPrefix()intgetOrder()
-
-
-
Constructor Detail
-
GatewayMetricsFilter
public GatewayMetricsFilter(io.micrometer.core.instrument.MeterRegistry meterRegistry, List<GatewayTagsProvider> tagsProviders, String metricsPrefix)
-
-
Method Detail
-
getMetricsPrefix
public String getMetricsPrefix()
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
filter
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
Description copied from interface:GlobalFilterProcess the Web request and (optionally) delegate to the nextGatewayFilterthrough the givenGatewayFilterChain.- Specified by:
filterin interfaceGlobalFilter- Parameters:
exchange- the current server exchangechain- provides a way to delegate to the next filter- Returns:
Mono<Void>to indicate when request processing is complete
-
-