Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blacklisting Percentile Metrics #924

Open
anderoo opened this issue Mar 2, 2024 · 3 comments
Open

Blacklisting Percentile Metrics #924

anderoo opened this issue Mar 2, 2024 · 3 comments

Comments

@anderoo
Copy link

anderoo commented Mar 2, 2024

Hello, is it possible to blacklist metrics for certain percentiles or attributes? I'd like to drop 75thPercentile and 95thPercentile metrics for Cassandra. For example:org.apache.cassandra.metrics:type=Table,keyspace=*,scope=*,name=RangeLatency Attribute=75thPercentile.

I've tried excludeObjectNameAttributes and Blacklist with various patterns to no success

@dhoard
Copy link
Collaborator

dhoard commented Mar 4, 2024

@anderoo Currently, the mechanism to exclude specific attributes (excludeObjectNameAttributes) requires the full ObjectName. Wildcards are not supported.

Why are wildcards not supported?

Using wildcards would require a regex match for every ObjectName / attribute name combination (fully qualified attribute.)

Considering the number of possible metrics, this would drastically kill performance.

@anderoo
Copy link
Author

anderoo commented Mar 4, 2024

@dhoard Thanks for the reply. Is the wildcard logic not the same for blacklisting then? I currently have a few wildcard blacklists with the intention of improving performance, and my goal with dropping certain percentiles is to improve performance further and reduce the number of metrics scraped.

I'll see if I can get these working with full object names in the meantime, but given labels like "table" would be fairly flexible, it's probably not a solution.

@dhoard
Copy link
Collaborator

dhoard commented Mar 5, 2024

@anderoo The MBean ObjectName doesn't contain the names of attributes of the MBean.

To filter by only ObjectName / only attribute name or the combination would require building a string for every ObjectName/attribute combination, and then performing the regex filtering which would be expensive.

I would double-check how Cassandra implements the MBean. If they periodically calculate the value and store it, then the call to get the value should be quick. If they are calculating it "inline", then the call to get the value is expensive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants