AWS Cloudwatch has an api which allows fetching metric statistics:
I have been able to find the REST definition for azure which appears to have similar functionality:
but I can't find the Go implementation. azure-sdk-for-go
has a lot of code in it, but I can't find the code for listing metric values.
Some more details: I am trying to get status code statistics for an application gateway.