Skip to content

Support for Filters in Metric Aggregations #9690

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

Open
franco-martin opened this issue Apr 17, 2025 · 0 comments
Open

Support for Filters in Metric Aggregations #9690

franco-martin opened this issue Apr 17, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@franco-martin
Copy link

Is your feature request related to a problem? Please describe.
Yes. Im using TSVB to calculate CPU usage as a percentage but it works for lots of other metrics in an opentelemetry schema.
Im using the opentelemetry operator with a prometheus scraper and using data prepper to send the data to opensearch. My schema looks like this:
Image
It should be easy as calculating the sum of the idle time and divide it by the sum of time in all CPU modes, that should give us the percentage of time.
Same applies to all operations that require performing an aggregation on some fields to perform a mathematical operation in some other fields, this has also happened with calculating IO latency. I need to sum the time that was spent reading from disk and divide that by the operations that were performed.
This isn't an issue when prometheus sends its data to metricbeat like I explain here since metricbeat pushes the metric name as its own field, increasing field count (which is not great).

Describe the solution you'd like
We can either support cross series operations or add another field for metric aggregations where we can add a filter. so that instead of only having Aggregation and Field, we would also have a filter like we do on the Filter Ratio aggregation

Describe alternatives you've considered

We can either support cross series operations or add another field for metric aggregations where we can add a filter.
Cross series operations would be very interesting to see, but I understand that it might be more complicated to implement.

Additional context

@franco-martin franco-martin added the enhancement New feature or request label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant