Stream metrics
Stream Size Metrics
These metrics are calculated across several brokers and partitions.
The following steps are followed to calculate the metrics:
-
Values get queried across all the replicas (represents values of all partitions with replicas)
-
Values get aggregated using
sum
aggregation function by pod (represents value for requested topic per pod)
For these metrics, all aggregation
functions and groupBy
are supported.
Stream Rate Metrics
These metrics are calculated by performing a Prometheus’s rate function.
The rateSize
by default is 5 minutes, but it can be set to anything you prefer.
Rate function takes several data points back in time and calculates mean value.
Using rateSize
Decreasing the rateSize
will make the result more "sharp", since window would contain fewer data points and spikes will be visualized better.
Increasing the rateSize
will make the result more "smooth", since window would contain more data points and producing/consuming spikes will be smoothed.
We suggest to take a look at this article that tries to explain how the rate function works in Prometheus. |
As mentioned in the Stream Rate description section, rateSize
can be changed for different result.
Below is the examples of using different rate size.
Request with rateSize of 5 minutes
{ "metric": "io.axual.stream/incoming_byte_rate", "rateSize": "PT5M", "stepSize": "PT1M", "timeWindow": "PT15M", "filter": { "type": "AND", "filters": [ { "type": "FIELD", "field": "environment", "operation": "EQUALS", "value": "dev" }, { "type": "FIELD", "field": "stream", "operation": "EQUALS", "value": "payment-events-stream" } ] } }
Response with rateSize of 5 minutes
{ "type": "UNGROUPED", "dataPoints": [ { "timestamp": "2022-10-25T09:33:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:34:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:35:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:36:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:37:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:38:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:39:00", "value": 81.83703703703705, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:40:00", "value": 245.51111111111115, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:41:00", "value": 409.1851851851852, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:42:00", "value": 818.3703703703704, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:43:00", "value": 900.2074074074075, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:44:00", "value": 900.2074074074075, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:45:00", "value": 1063.8814814814814, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:46:00", "value": 1063.8814814814814, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:47:00", "value": 1063.8814814814814, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:33:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:34:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:35:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:36:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:37:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:38:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:39:00", "value": 81.83703703703705, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:40:00", "value": 245.51111111111115, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:41:00", "value": 327.3481481481482, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:42:00", "value": 327.3481481481482, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:43:00", "value": 572.8592592592593, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:44:00", "value": 491.0222222222223, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:45:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:46:00", "value": 818.3703703703704, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:47:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:33:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:34:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:35:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:36:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:37:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:38:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:39:00", "value": 81.83703703703705, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:40:00", "value": 491.0222222222223, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:41:00", "value": 818.3703703703704, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:42:00", "value": 1145.7185185185185, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:43:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:44:00", "value": 1697.1666666666667, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:45:00", "value": 1227.5555555555557, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:46:00", "value": 1145.7185185185185, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:47:00", "value": 1227.5555555555557, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null } ] }
Request with rateSize of 1 minute
{ "metric": "io.axual.stream/incoming_byte_rate", "rateSize": "PT1M", "stepSize": "PT1M", "timeWindow": "PT15M", "filter": { "type": "AND", "filters": [ { "type": "FIELD", "field": "environment", "operation": "EQUALS", "value": "dev" }, { "type": "FIELD", "field": "stream", "operation": "EQUALS", "value": "payment-events-stream" } ] } }
Response with rateSize of 1 minute
{ "type": "UNGROUPED", "dataPoints": [ { "timestamp": "2022-10-25T09:33:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:34:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:35:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:36:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:37:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:38:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:39:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:40:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:41:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:42:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:43:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:44:00", "value": 736.6315508734498, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:45:00", "value": 2209.6, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:46:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:47:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-2", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:33:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:34:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:35:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:36:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:37:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:38:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:39:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:40:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:41:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:42:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:43:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:44:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:45:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:46:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:47:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-1", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:33:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:34:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:35:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:36:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:37:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:38:00", "value": 0, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:39:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:40:00", "value": 3682.6666666666665, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:41:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:42:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:43:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:44:00", "value": 1280.3666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:45:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:46:00", "value": 736.5333333333333, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null }, { "timestamp": "2022-10-25T09:47:00", "value": 1473.0666666666666, "labels": { "axual_cluster": "jupiter", "pod": "jupiter-kafka-0", "topic": "axual-qa-dev-payment-events-stream" }, "unit": null } ] }
Visual comparison
With rateSize of 5 minutes:

With rateSize of 1 minute:
