public final class Search
extends java.lang.Object
Meter
or set of meters in a given registry based on any combination of their
name, tags, and type.Modifier and Type | Method and Description |
---|---|
Counter |
counter() |
java.util.Collection<Counter> |
counters() |
FunctionCounter |
functionCounter() |
java.util.Collection<FunctionCounter> |
functionCounters() |
FunctionTimer |
functionTimer() |
java.util.Collection<FunctionTimer> |
functionTimers() |
Gauge |
gauge() |
java.util.Collection<Gauge> |
gauges() |
static Search |
in(MeterRegistry registry)
Initiate a new search for meters inside a registry.
|
LongTaskTimer |
longTaskTimer() |
java.util.Collection<LongTaskTimer> |
longTaskTimers() |
Meter |
meter() |
java.util.Collection<Meter> |
meters() |
Search |
name(java.util.function.Predicate<java.lang.String> nameMatches)
Meter contains a tag matching the name predicate.
|
Search |
name(java.lang.String exactName)
Meter contains a tag with the exact name.
|
java.util.Collection<DistributionSummary> |
summaries() |
DistributionSummary |
summary() |
Search |
tag(java.lang.String tagKey,
java.lang.String tagValue)
Meter contains a tag with the matching key and value.
|
Search |
tagKeys(java.lang.String... tagKeys)
Meter contains a tag with the matching keys.
|
Search |
tags(java.lang.Iterable<Tag> tags)
Meter contains a tag with the matching tag keys and values.
|
Search |
tags(java.lang.String... tags)
Meter contains a tag with the matching tag keys and values.
|
TimeGauge |
timeGauge() |
java.util.Collection<TimeGauge> |
timeGauges() |
Timer |
timer() |
java.util.Collection<Timer> |
timers() |
public Search name(java.lang.String exactName)
exactName
- Name to match against.public Search name(@Nullable java.util.function.Predicate<java.lang.String> nameMatches)
nameMatches
- Name matching predicate.public Search tags(java.lang.Iterable<Tag> tags)
tags
- The tags to match.public Search tags(java.lang.String... tags)
tags
- Must be an even number of arguments representing key/value pairs of tags.public Search tag(java.lang.String tagKey, java.lang.String tagValue)
tagKey
- The tag key to match.tagValue
- The tag value to match.public Search tagKeys(java.lang.String... tagKeys)
tagKeys
- The tag keys to match.@Nullable public Counter counter()
Counter
, or null
if none match.@Nullable public FunctionCounter functionCounter()
FunctionCounter
, or null
if none match.@Nullable public TimeGauge timeGauge()
TimeGauge
, or null
if none match.@Nullable public FunctionTimer functionTimer()
FunctionTimer
, or null
if none match.@Nullable public DistributionSummary summary()
DistributionSummary
, or null
if none match.@Nullable public LongTaskTimer longTaskTimer()
LongTaskTimer
, or null
if none match.public java.util.Collection<Meter> meters()
public java.util.Collection<DistributionSummary> summaries()
DistributionSummary
meters.public java.util.Collection<LongTaskTimer> longTaskTimers()
LongTaskTimer
meters.public java.util.Collection<FunctionCounter> functionCounters()
FunctionCounter
meters.public java.util.Collection<FunctionTimer> functionTimers()
FunctionTimer
meters.public java.util.Collection<TimeGauge> timeGauges()
TimeGauge
meters.public static Search in(MeterRegistry registry)
registry
- The registry to locate meters in.