Package io.prometheus.jmx
Class ObjectNameAttributeFilter
java.lang.Object
io.prometheus.jmx.ObjectNameAttributeFilter
Class to implement filtering of an MBean's attributes based on the attribute's name
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ObjectName objectName, String attributeName) Method to add an attribute name to the filter if dynamic exclusion is enabledstatic ObjectNameAttributeFilter
Method to create an ObjectNameAttributeFilterboolean
exclude
(ObjectName objectName, String attributeName) Method to check if an attribute should be excludedvoid
onlyKeepMBeans
(Set<ObjectName> aliveMBeans) Method to only keep "alive" mBeans, remove old mBeans to prevent memory growth
-
Field Details
-
EXCLUDE_OBJECT_NAME_ATTRIBUTES
Configuration constant to define a mapping of ObjectNames to attribute names- See Also:
-
AUTO_EXCLUDE_OBJECT_NAME_ATTRIBUTES
Configuration constant to enable auto ObjectName attributes filtering- See Also:
-
-
Method Details
-
add
Method to add an attribute name to the filter if dynamic exclusion is enabled- Parameters:
objectName
- the ObjectNameattributeName
- the attribute name
-
onlyKeepMBeans
Method to only keep "alive" mBeans, remove old mBeans to prevent memory growth- Parameters:
aliveMBeans
- aliveMBeans
-
exclude
Method to check if an attribute should be excluded- Parameters:
objectName
- the ObjectNameattributeName
- the attribute name- Returns:
- true if it should be excluded, false otherwise
-
create
Method to create an ObjectNameAttributeFilter- Parameters:
yamlConfig
- yamlConfig- Returns:
- an ObjectNameAttributeFilter
-