Class RetrofitMeterIdPrefixFunction
java.lang.Object
com.linecorp.armeria.client.retrofit2.RetrofitMeterIdPrefixFunction
- All Implemented Interfaces:
MeterIdPrefixFunction
public final class RetrofitMeterIdPrefixFunction extends Object implements MeterIdPrefixFunction
Returns the default function for retrofit that creates a
MeterIdPrefix
with the specified name and
the Tag
s derived from the RequestLog
properties and Invocation
.
service
(orserviceTagName
) - Retrofit service interface name, providedserviceName
orUNKNOWN
if Retrofit service interface method availablepath
- Retrofit service interface method path taken from method annotation orRequestHeaderGetters.path()
if Retrofit service interface method availablemethod
- Retrofit service interface method orUNKNOWN
if Retrofit service interface method availablehttp.method
- HTTP method name from Retrofit service interface method annotation or fromRequestHeaderGetters.method()
if Retrofit service interface method not availablehttp.status
-HttpStatus.code()
-
Method Summary
Modifier and Type Method Description MeterIdPrefix
activeRequestPrefix(MeterRegistry registry, RequestOnlyLog log)
Creates aMeterIdPrefix
for the active request counter gauges from the specifiedRequestOnlyLog
.MeterIdPrefix
completeRequestPrefix(MeterRegistry registry, RequestLog log)
Creates aMeterIdPrefix
from the specified completeRequestLog
.static RetrofitMeterIdPrefixFunction
of(String name)
Returns a newly createdRetrofitMeterIdPrefixFunction
with the specifiedname
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.common.metric.MeterIdPrefixFunction
andThen, withTags, withTags, withTags
-
Method Details
-
of
Returns a newly createdRetrofitMeterIdPrefixFunction
with the specifiedname
. -
activeRequestPrefix
Description copied from interface:MeterIdPrefixFunction
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:- Specified by:
activeRequestPrefix
in interfaceMeterIdPrefixFunction
-
completeRequestPrefix
Description copied from interface:MeterIdPrefixFunction
Creates aMeterIdPrefix
from the specified completeRequestLog
.- Specified by:
completeRequestPrefix
in interfaceMeterIdPrefixFunction
-