Benchmark and optimize the apiUsageMonitoring() filter
In certain cases, unnecessarily long time spent was observed in the apiUsageMonitoring() filter. It should be benchmarked and if optimization possibilities were found, then implemented.
One possible optimization can be to avoid caching of the concatenated keys and see if the concatenating them on-the-fly turns out to be cheaper than caching them in a sync.Map.
After looking on many request-filter traces, I come to the conclusion, that the performance of the apiUsageMonitoring-filter seems within expected bounds. There surely is room for improvement, but it is unlikely, that it is the reason of the experienced problems.
@tkrop can you share your expected bounds? We might want to document these boundaries, if you have some in mind. :)