public final class RequiredSearch extends Object
MeterNotFoundException
is thrown.public RequiredSearch name(String exactName)
exactName
- Name to match against.public RequiredSearch name(Predicate<String> nameMatches)
nameMatches
- Name matching predicate.public RequiredSearch tags(Iterable<Tag> tags)
tags
- The tags to match.public RequiredSearch tags(String... tags)
tags
- Must be an even number of arguments representing key/value pairs of tags.public RequiredSearch tag(String tagKey, String tagValue)
tagKey
- The tag key to match.tagValue
- The tag value to match.public RequiredSearch tagKeys(String... tagKeys)
tagKeys
- The tag keys to match.public Timer timer()
Timer
MeterNotFoundException
- if there is no match.public Counter counter()
Counter
.MeterNotFoundException
- if there is no match.public Gauge gauge()
Gauge
.MeterNotFoundException
- if there is no match.public FunctionCounter functionCounter()
FunctionCounter
.MeterNotFoundException
- if there is no match.public TimeGauge timeGauge()
TimeGauge
.MeterNotFoundException
- if there is no match.public FunctionTimer functionTimer()
FunctionTimer
.MeterNotFoundException
- if there is no match.public DistributionSummary summary()
DistributionSummary
.MeterNotFoundException
- if there is no match.public LongTaskTimer longTaskTimer()
LongTaskTimer
.MeterNotFoundException
- if there is no match.public Meter meter()
Meter
.MeterNotFoundException
- if there is no match.public Collection<Meter> meters()
MeterNotFoundException
- if there is no match.public Collection<Counter> counters()
Counter
meters.public Collection<Gauge> gauges()
Gauge
meters.public Collection<Timer> timers()
Timer
meters.public Collection<DistributionSummary> summaries()
DistributionSummary
meters.public Collection<LongTaskTimer> longTaskTimers()
LongTaskTimer
meters.public Collection<FunctionCounter> functionCounters()
FunctionCounter
meters.public Collection<FunctionTimer> functionTimers()
FunctionTimer
meters.public Collection<TimeGauge> timeGauges()
TimeGauge
meters.public static RequiredSearch in(MeterRegistry registry)
registry
- The registry to locate meters in.Copyright © 2018. All rights reserved.