Interface MeterIdPrefixFunction
- All Known Implementing Classes:
GrpcMeterIdPrefixFunction
,RetrofitMeterIdPrefixFunction
public interface MeterIdPrefixFunction
Creates a
MeterIdPrefix
from a RequestLog
.- See Also:
MetricCollectingClient
,MetricCollectingService
-
Method Summary
Modifier and Type Method Description MeterIdPrefix
activeRequestPrefix(MeterRegistry registry, RequestOnlyLog log)
Creates aMeterIdPrefix
for the active request counter gauges from the specifiedRequestOnlyLog
.default MeterIdPrefixFunction
andThen(MeterIdPrefixFunctionCustomizer function)
Returns aMeterIdPrefixFunction
that applies transformation on theMeterIdPrefix
returned by this function.MeterIdPrefix
completeRequestPrefix(MeterRegistry registry, RequestLog log)
Creates aMeterIdPrefix
from the specified completeRequestLog
.static MeterIdPrefixFunction
of(BiFunction<? super MeterRegistry,? super RequestOnlyLog,MeterIdPrefix> function)
Returns aMeterIdPrefixFunction
which generates aMeterIdPrefix
from the givenMeterRegistry
andRequestOnlyLog
.static MeterIdPrefixFunction
ofDefault(String name)
Returns the default function that creates aMeterIdPrefix
with the specified name and theTag
s derived from theRequestLog
properties.default MeterIdPrefixFunction
withTags(Iterable<Tag> tags)
Returns aMeterIdPrefixFunction
that returns a newly createdMeterIdPrefix
which has the specified labels added.default MeterIdPrefixFunction
withTags(String... keyValues)
Returns aMeterIdPrefixFunction
that returns a newly createdMeterIdPrefix
which has the specified label added.
-
Method Details
-
ofDefault
Returns the default function that creates aMeterIdPrefix
with the specified name and theTag
s derived from theRequestLog
properties.- Server-side tags:
hostnamePattern
-VirtualHost.hostnamePattern()
route
-Route.patternString()
method
- RPC method name orEnum.name()
if RPC method name is not availablehttpStatus
-HttpStatus.code()
- Client-side tags:
method
- RPC method name orEnum.name()
if RPC method name is not availablehttpStatus
-HttpStatus.code()
- Server-side tags:
-
of
static MeterIdPrefixFunction of(BiFunction<? super MeterRegistry,? super RequestOnlyLog,MeterIdPrefix> function)Returns aMeterIdPrefixFunction
which generates aMeterIdPrefix
from the givenMeterRegistry
andRequestOnlyLog
. BothactiveRequestPrefix(MeterRegistry, RequestOnlyLog)
andcompleteRequestPrefix(MeterRegistry, RequestLog)
will return the sameMeterIdPrefix
for the same input. -
activeRequestPrefix
Creates aMeterIdPrefix
for the active request counter gauges from the specifiedRequestOnlyLog
. Note that the givenRequestOnlyLog
might not have all properties available. However, the following properties' availability is guaranteed: -
completeRequestPrefix
Creates aMeterIdPrefix
from the specified completeRequestLog
. -
withTags
Returns aMeterIdPrefixFunction
that returns a newly createdMeterIdPrefix
which has the specified label added. -
withTags
Returns aMeterIdPrefixFunction
that returns a newly createdMeterIdPrefix
which has the specified labels added. -
andThen
Returns aMeterIdPrefixFunction
that applies transformation on theMeterIdPrefix
returned by this function.
-