Class ObjectNameAttributeFilter

java.lang.Object
io.prometheus.jmx.ObjectNameAttributeFilter

public class ObjectNameAttributeFilter extends Object
Class to implement filtering of an MBean's attributes based on the attribute's name
  • Field Details

  • Method Details

    • add

      public void add(ObjectName objectName, String attributeName)
      Method to add an attribute name to the filter if dynamic exclusion is enabled
      Parameters:
      objectName - the ObjectName
      attributeName - the attribute name
    • onlyKeepMBeans

      public void onlyKeepMBeans(Set<ObjectName> aliveMBeans)
      Method to only keep "alive" mBeans, remove old mBeans to prevent memory growth
      Parameters:
      aliveMBeans - aliveMBeans
    • exclude

      public boolean exclude(ObjectName objectName, String attributeName)
      Method to check if an attribute should be excluded
      Parameters:
      objectName - the ObjectName
      attributeName - the attribute name
      Returns:
      true if it should be excluded, false otherwise
    • create

      public static ObjectNameAttributeFilter create(Map<String,Object> yamlConfig)
      Method to create an ObjectNameAttributeFilter
      Parameters:
      yamlConfig - yamlConfig
      Returns:
      an ObjectNameAttributeFilter