Avoid incrementing the counter by 0 for elasticsearch calls

Avoid incrementing the elasticsseach prometheus counter by 0 in the RackMiddleware

The following discussion from !38394 (merged) should be addressed:

  • @DylanGriffith started a discussion:

    I'll move this to a separate issue since this is an improvement either way.

    I wonder if the increment above with 0 should also be below this early return. Does having a 0 increment cause a data point to exist in Prometheus for every controller and action? Will having a bunch of zeros similarly use a lot of Prometheus resources? Or will it be ignored because incrementing with 0 is a no-op?

Edited by Bob Van Landuyt