@FunctionalInterface public interface MeterIdPrefixFunction
MeterIdPrefix from a RequestLog.MetricCollectingClient,
MetricCollectingService| Modifier and Type | Method and Description |
|---|---|
default MeterIdPrefix |
activeRequestPrefix(MeterRegistry registry,
RequestLog log)
Creates a
MeterIdPrefix for the active request counter gauges from the specified
RequestLog. |
default MeterIdPrefixFunction |
andThen(BiFunction<MeterRegistry,MeterIdPrefix,MeterIdPrefix> function)
Returns a
MeterIdPrefixFunction that applies transformation on the MeterIdPrefix
returned by this function. |
MeterIdPrefix |
apply(MeterRegistry registry,
RequestLog log)
Creates a
MeterIdPrefix from the specified RequestLog. |
static MeterIdPrefixFunction |
ofDefault(String name)
Returns the default function that creates a
MeterIdPrefix with the specified name and
the Tags derived from the RequestLog properties. |
default MeterIdPrefixFunction |
withTags(Iterable<Tag> tags)
Returns a
MeterIdPrefixFunction that returns a newly created MeterIdPrefix which has
the specified labels added. |
default MeterIdPrefixFunction |
withTags(String... keyValues)
Returns a
MeterIdPrefixFunction that returns a newly created MeterIdPrefix which has
the specified label added. |
static MeterIdPrefixFunction ofDefault(String name)
MeterIdPrefix with the specified name and
the Tags derived from the RequestLog properties.
hostnamePattern - VirtualHost.hostnamePattern()
route - Route.meterTag()method - RPC method name or Enum.name() if RPC method name is not
availablehttpStatus - HttpStatus.code()method - RPC method name or Enum.name() if RPC method name is not
availablehttpStatus - HttpStatus.code()MeterIdPrefix apply(MeterRegistry registry, RequestLog log)
MeterIdPrefix from the specified RequestLog.default MeterIdPrefix activeRequestPrefix(MeterRegistry registry, RequestLog log)
MeterIdPrefix for the active request counter gauges from the specified
RequestLog. This method by default delegates to apply(MeterRegistry, RequestLog).
You must override this method if your apply(MeterRegistry, RequestLog) implementation builds
a MeterIdPrefix using response properties that's not always available when the active request
counter is increased, such as HTTP status.default MeterIdPrefixFunction withTags(String... keyValues)
MeterIdPrefixFunction that returns a newly created MeterIdPrefix which has
the specified label added.default MeterIdPrefixFunction withTags(Iterable<Tag> tags)
MeterIdPrefixFunction that returns a newly created MeterIdPrefix which has
the specified labels added.default MeterIdPrefixFunction andThen(BiFunction<MeterRegistry,MeterIdPrefix,MeterIdPrefix> function)
MeterIdPrefixFunction that applies transformation on the MeterIdPrefix
returned by this function.Copyright © 2020 LeanCloud. All rights reserved.