-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Couldnt aggregate cummilative metrics on time and then label #36578
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi @SrinidhiK22 can you please provide some example input, ideally the payload of a prometheus endpoint containing the original metrics, and the expected output after applying the processors? |
@bacherfl Thanks for your reply. the endpoint has metrics like:
and the collected metric is 11:16:40 {"type":"cumulativeCount","count":0.0,"cumulative":1.0} endpoint1 east this thing repeats for every 10s like and increases if new requests come 11:16:50 {"type":"cumulativeCount","count":0.0,"cumulative":1.0} endpoint1 east I want to aggregate based on time interval consider 30s and also label : endpoint Expected output : from 11:16:40 to 11:17:00: 11:17:00 {"type":"cumulativeCount","count":0.0,"cumulative":3.0} endpoint1 Requirement : this type of aggregation should work for all types of metrics like guages, histograms (only sum), updowncounters. |
Component(s)
processor/metricstransform
Describe the issue you're reporting
Background: I have a counter metric, custom_api_requests, with attributes endpoint (e.g., endpoint1, endpoint2) and region (e.g., east, west, south). When I scrape this metric every 10 seconds using the Prometheus receiver, I get 6 data points every 10 seconds. Over a 30-second period, this results in 18 data points.
Goal:
I want to aggregate these 18 data points into two (one for each endpoint), each with a same single timestamp (e.g., at the 30-second mark) and aggregated values based on label.
Attempted Solutions:
This gives 6 metric points for 30s ( 2metrics for 10s as they dont have same timestamp)
This gives 6 metric points for 30s (all having 30s timestamp but aggregated like before)
This is giving two points but the value of counter is adding up
The text was updated successfully, but these errors were encountered: