I'm trying to define a Service Level Objective (SLO) for my Google Cloud Run service based on latency. However, I need to exclude specific paths (e.g., /long-process, /batch-job) that inherently have long latencies and shouldn't impact my overall SLO.
How can I define an SLO for a Cloud Run service that excludes specific paths with long latencies?
I see this route parameter in the latency metric. How to use it?
Any guidance, examples, or best practices would be appreciated!
It is not possible to filter the paths when creating Service Level Objective
(SLO) for Cloud Run service based on latency, AFAIK there is no direct method for monitoring the same because,
For metric request\_latencies
there are only 3 filters:
response_code: Response code of a request.
Response code class of a request.
route: Always empty.response_code_class:
As the default value for route is empty we cannot add additional filters.
Upon checking there is a Feature Request and there no ETA on this feature request, but you can follow workaround mentioned in this stack link to monitor or you can create a new Issue Tracker thread describing your issue. If you have paid support try create an issue