'How to track GCP API request parameters

I have an API Gateway set up with GCP. I am looking for a way to track the number of requests for each parameter specified in the API request.

For example the api receives 1200 GET requests for api.example.com/ex?special=true and 300 GET request for api.example.com/ex?counter=11 I'm looking for a way to see the metrics (number of requests) for each parameter (so special would be 1200 and counter would be 300).

Is logging the solution?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source