public final class PrefixMetricFilter extends java.lang.Object implements MetricFilter
Constructor and Description |
---|
PrefixMetricFilter(java.lang.String tagKey,
MetricFilter root,
java.util.NavigableMap<java.lang.String,MetricFilter> filters)
Creates a new prefix filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(MonitorConfig config)
Check if a metric with the provided configuration should be selected and
sent to observers.
|
public PrefixMetricFilter(java.lang.String tagKey, MetricFilter root, java.util.NavigableMap<java.lang.String,MetricFilter> filters)
tagKey
- the tag to perform matching on, if null the name will be
checkedroot
- filter used if there are no prefix matchesfilters
- map of prefix to sub-filter. The filter associated with
the longest matching prefix will be used.public boolean matches(MonitorConfig config)
matches
in interface MetricFilter
config
- config settings associated with the metric