Reputation: 1499
Disclaimer: I'm new to PromQL, and might have constructed a query that is completely wrong. I'm using PromQL as the built-in monitoring of Google Cloud does not produce expected results (see this post).
When I use PromQL for a custom metric in Google Cloud I'm facing several issues:
I mainly want to have a sum of log-based metrics that contains a number of API hits like:
hits: 14
hits: 56
...
an interval should just show the sum of these numbers.
The query:
sum by (dag_id) (
sum_over_time(logging_googleapis_com:user_metric_sum[30m])
)
Data is gone when zooming out:
Multiple data points when zoomed in:
Sums are wrong when zooming out (note the y-axis changing):
Upvotes: 1
Views: 1308