Class Search
java.lang.Object
io.micrometer.core.instrument.search.Search
Search terms for locating a
Meter
or set of meters in a given registry based on
any combination of their name, tags, and type.-
Method Summary
Modifier and TypeMethodDescriptioncounter()
counters()
gauge()
gauges()
static Search
in
(MeterRegistry registry) Initiate a new search for meters inside a registry.meter()
meters()
Meter contains a tag with the exact name.Meter contains a tag matching the name predicate.summary()
Meter contains a tag with the matching key and value.Meter contains a tag with the provided key and a value matchingtagValueMatches
.Meter contains tags with the matching keys.tagKeys
(Collection<String> tagKeys) Meter contains tags with the matching keys.Meter contains tags with the matching tag keys and values.Meter contains tags with the matching tag keys and values.timer()
timers()
-
Method Details
-
name
Meter contains a tag with the exact name.- Parameters:
exactName
- Name to match against.- Returns:
- This search.
-
name
Meter contains a tag matching the name predicate.- Parameters:
nameMatches
- Name matching predicate.- Returns:
- This search.
-
tags
Meter contains tags with the matching tag keys and values.- Parameters:
tags
- The tags to match.- Returns:
- This search.
-
tags
Meter contains tags with the matching tag keys and values.- Parameters:
tags
- Must be an even number of arguments representing key/value pairs of tags.- Returns:
- This search.
-
tag
Meter contains a tag with the matching key and value.- Parameters:
tagKey
- The tag key to match.tagValue
- The tag value to match.- Returns:
- This search.
-
tagKeys
Meter contains tags with the matching keys.- Parameters:
tagKeys
- The tag keys to match.- Returns:
- This search.
-
tagKeys
Meter contains tags with the matching keys.- Parameters:
tagKeys
- The tag keys to match.- Returns:
- This search.
- Since:
- 1.7.0
-
tag
Meter contains a tag with the provided key and a value matchingtagValueMatches
.- Parameters:
tagKey
- The tag key to match.tagValueMatches
- The test on the tag value.- Returns:
- This search.
- Since:
- 1.6.0
-
timer
- Returns:
- The first matching
Timer
, ornull
if none match.
-
counter
- Returns:
- The first matching
Counter
, ornull
if none match.
-
gauge
- Returns:
- The first matching
Gauge
, ornull
if none match.
-
functionCounter
- Returns:
- The first matching
FunctionCounter
, ornull
if none match.
-
timeGauge
- Returns:
- The first matching
TimeGauge
, ornull
if none match.
-
functionTimer
- Returns:
- The first matching
FunctionTimer
, ornull
if none match.
-
summary
- Returns:
- The first matching
DistributionSummary
, ornull
if none match.
-
longTaskTimer
- Returns:
- The first matching
LongTaskTimer
, ornull
if none match.
-
meter
- Returns:
- The first matching
Meter
, ornull
if none match.
-
meters
- Returns:
- All matching meters, or an empty collection if none match.
-
acceptFilter
- Returns:
- An accept filter that accepts any meter that matches this search.
- Since:
- 1.6.0
-
counters
- Returns:
- All matching
Counter
meters.
-
gauges
- Returns:
- All matching
Gauge
meters.
-
timers
- Returns:
- All matching
Timer
meters.
-
summaries
- Returns:
- All matching
DistributionSummary
meters.
-
longTaskTimers
- Returns:
- All matching
LongTaskTimer
meters.
-
functionCounters
- Returns:
- All matching
FunctionCounter
meters.
-
functionTimers
- Returns:
- All matching
FunctionTimer
meters.
-
timeGauges
- Returns:
- All matching
TimeGauge
meters.
-
in
Initiate a new search for meters inside a registry.- Parameters:
registry
- The registry to locate meters in.- Returns:
- A new search.
-