Interface MetricsFilter

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Internal public interface MetricsFilter
Allows filtering of metrics that will be included or excluded from the published metrics.
Since:
4.1
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final MetricsFilter
    A filter that guarantees the inclusion of all meters
    static final MetricsFilter
    A filter that guarantees the exclusion of all meters
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    deny(String... names)
    Metrics with the specified names should NOT be present in published metrics.
    Metrics with the specified names should NOT be present in published metrics.
  • Field Details

    • ACCEPT_ALL

      static final MetricsFilter ACCEPT_ALL
      A filter that guarantees the inclusion of all meters
    • DENY_ALL

      static final MetricsFilter DENY_ALL
      A filter that guarantees the exclusion of all meters
  • Method Details

    • deny

      static MetricsFilter deny(String... names)
      Metrics with the specified names should NOT be present in published metrics.
      Parameters:
      names - When a metric name matches any of the specified values, it will be excluded from the published metrics.
      Returns:
      A filter that guarantees the exclusion of meters with any of the specified names.
    • deny

      static MetricsFilter deny(Collection<String> names)
      Metrics with the specified names should NOT be present in published metrics.
      Parameters:
      names - When a metric name matches any of the specified values, it will be excluded from the published metrics.
      Returns:
      A filter that guarantees the exclusion of meters with any of the specified names.
    • accepts

      boolean accepts(String name)
      Parameters:
      name - metrics name
      Returns:
      true if metrics with the given name should be accepted