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 Details

    • MaximumAllowableTagsMeterFilter

      public MaximumAllowableTagsMeterFilter(String meterNamePrefix, String tagKey, int maximumTagValues)
      Create a new MaximumAllowableTagsMeterFilter with an upper bound on the number of tags produced by matching metrics.
      Parameters:
      meterNamePrefix - the prefix of the meter name to apply the filter to
      tagKey - the tag to place an upper bound on
      maximumTagValues - the total number of tag values that are allowable
    • MaximumAllowableTagsMeterFilter

      public MaximumAllowableTagsMeterFilter(String meterNamePrefix, String tagKey, int maximumTagValues, @Nullable String hint)
      Create a new MaximumAllowableTagsMeterFilter with an upper bound on the number of tags produced by matching metrics.
      Parameters:
      meterNamePrefix - the prefix of the meter name to apply the filter to
      tagKey - the tag to place an upper bound on
      maximumTagValues - the total number of tag values that are allowable
      hint - an additional hint to add to the logged message or null
  • Method Details

    • accept

      public io.micrometer.core.instrument.config.MeterFilterReply accept(io.micrometer.core.instrument.Meter.Id id)
      Specified by:
      accept in interface io.micrometer.core.instrument.config.MeterFilter