I want to execute MQL (metric query language) to get sum of all values from "metric.size" column which have the same "metric.id".
It should be grouped by id, and size column to be the sum of all the size values for matching id, and this within a certain time range.
In SQL it would look something like below: select id, sum(size) from "metric" group by id where ts is bigger X & less than Y
I have tried many variation of the below command; using within, every, window with no luck.
fetch k8s_container | metric 'logging.googleapis.com/user/ingestion-info' | group_by [metric.tenantId], sum(metric.size) | every 13h
Any help would be greatly appreciated. Thank you.
Also i have tried solutions in the below links: Unable to collect data from metric query language MQL - GCP GCP MQL query: getting metrics/minute