An error ratio divides failed requests by all eligible requests in the same scope and window. Averaging instance percentages gives small instances the same weight as busy ones. Add the event rates first, then divide, and state what happens when the denominator is absent.
Read the labels before you run the example. This workbench evaluates the final sample of a regularly spaced fixture, so its rates omit Prometheus scrape extrapolation. Compare the result with the underlying series, then change the service scope. The last request leaves the query construction to you; a hard-coded number won't survive the changed dataset.