public class RouterFunctionMetrics extends Object
RouterFunction
-related metrics.Constructor and Description |
---|
RouterFunctionMetrics(io.micrometer.core.instrument.MeterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
RouterFunctionMetrics |
defaultTags(BiFunction<ServerRequest,ServerResponse,Iterable<io.micrometer.core.instrument.Tag>> defaultTags)
Returns a new
RouterFunctionMetrics instance with the specified default
tags. |
static io.micrometer.core.instrument.Tag |
getMethodTag(ServerRequest request)
Creates a
method tag from the method of the given request . |
static io.micrometer.core.instrument.Tag |
getStatusTag(ServerResponse response)
Creates a
status tag from the status of the given response . |
HandlerFilterFunction<ServerResponse,ServerResponse> |
timer(String name) |
HandlerFilterFunction<ServerResponse,ServerResponse> |
timer(String name,
Iterable<io.micrometer.core.instrument.Tag> tags) |
HandlerFilterFunction<ServerResponse,ServerResponse> |
timer(String name,
String... tags) |
public RouterFunctionMetrics(io.micrometer.core.instrument.MeterRegistry registry)
public RouterFunctionMetrics defaultTags(BiFunction<ServerRequest,ServerResponse,Iterable<io.micrometer.core.instrument.Tag>> defaultTags)
RouterFunctionMetrics
instance with the specified default
tags.defaultTags
- Generate a list of tags to apply to the timer.
ServerResponse
may be null.this
for further configurationpublic HandlerFilterFunction<ServerResponse,ServerResponse> timer(String name)
public HandlerFilterFunction<ServerResponse,ServerResponse> timer(String name, String... tags)
public HandlerFilterFunction<ServerResponse,ServerResponse> timer(String name, Iterable<io.micrometer.core.instrument.Tag> tags)
public static io.micrometer.core.instrument.Tag getMethodTag(ServerRequest request)
method
tag from the method of the given request
.request
- The HTTP request.public static io.micrometer.core.instrument.Tag getStatusTag(ServerResponse response)
status
tag from the status of the given response
.response
- The HTTP response.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.