GoogleCloudPlatform / cloud-run-release-manager

[EXPERIMENTAL] Automated canary rollout tool for Cloud Run services.
Apache License 2.0
128 stars 10 forks source link

stackdriver: Return 0 if no request in interval #64

Closed gvso closed 4 years ago

gvso commented 4 years ago

When no request was made in the interval, Latency and ErrorRate returns errors that are propagated all the way to the main package. No requests shouldn't represent a metrics error.

gvso commented 4 years ago

Here's my thought on this and why the methods should return 0:

  1. We can make the argument that if you don't get any requests, your error rate is 0 since you didn't get any requests in the first place. A similar argument is applicable to latency.
  2. If you got no requests in the interval, and you have some min-request-count, you will get an inconclusive result anyways.
  3. If you specify min-request-count=0, we can probably assume the user wants a "kitchen-timer" mode. That is, the metrics don't matter for this user.
  4. This behavior returns the same value as RequestCount, though there's an stronger and obvious argument for RequestCount returning 0 when no requests in interval.
  5. I believe this approach is much easier to implement and think about.
  6. How common is that a service using gradual rollouts doesn't have at least modest traffic?

Any thoughts?