Class MaximumAllowableTagsMeterFilter
java.lang.Object
org.springframework.boot.micrometer.metrics.MaximumAllowableTagsMeterFilter
- All Implemented Interfaces:
io.micrometer.core.instrument.config.MeterFilter
public final class MaximumAllowableTagsMeterFilter
extends Object
implements io.micrometer.core.instrument.config.MeterFilter
MeterFilter to log a single warning message and deny a Meter.Id
after a number of attempts for a given tag.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionMaximumAllowableTagsMeterFilter(String meterNamePrefix, String tagKey, int maximumTagValues) Create a newMaximumAllowableTagsMeterFilterwith an upper bound on the number of tags produced by matching metrics.MaximumAllowableTagsMeterFilter(String meterNamePrefix, String tagKey, int maximumTagValues, @Nullable String hint) Create a newMaximumAllowableTagsMeterFilterwith an upper bound on the number of tags produced by matching metrics. -
Method Summary
Modifier and TypeMethodDescriptionio.micrometer.core.instrument.config.MeterFilterReplyaccept(io.micrometer.core.instrument.Meter.Id id) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micrometer.core.instrument.config.MeterFilter
configure, map
-
Constructor Details
-
MaximumAllowableTagsMeterFilter
Create a newMaximumAllowableTagsMeterFilterwith an upper bound on the number of tags produced by matching metrics.- Parameters:
meterNamePrefix- the prefix of the meter name to apply the filter totagKey- the tag to place an upper bound onmaximumTagValues- the total number of tag values that are allowable
-
MaximumAllowableTagsMeterFilter
public MaximumAllowableTagsMeterFilter(String meterNamePrefix, String tagKey, int maximumTagValues, @Nullable String hint) Create a newMaximumAllowableTagsMeterFilterwith an upper bound on the number of tags produced by matching metrics.- Parameters:
meterNamePrefix- the prefix of the meter name to apply the filter totagKey- the tag to place an upper bound onmaximumTagValues- the total number of tag values that are allowablehint- an additional hint to add to the logged message ornull
-
-
Method Details
-
accept
public io.micrometer.core.instrument.config.MeterFilterReply accept(io.micrometer.core.instrument.Meter.Id id) - Specified by:
acceptin interfaceio.micrometer.core.instrument.config.MeterFilter
-