Skip to content

Draft: Inject metrics support into Rails.cache

Vasilii Iakliushin requested to merge 413819_patch_rails_cache into master

What does this MR do and why?

Contributes to #413819

Problem

Gitlab::Cache::Client interface is complex to setup. It's not convenient to use it.

Solution

Provide labels for metrics via Rails cache option parameter. It's compatible with 'ActiveSupport::Cache::Store' interface and easy to introduce for existing cache calls.

Roadmap

Step Description
!122340 (merged) Initial refactoring to support labels per call
!122341 (merged) Minor refactoring to set default feature category
!122342 👈 Extend Rails.cache with labels support

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports