Move Gitlab::Metrics::Sli module from GitLab-rails to labkit-ruby

Summary

Move the Gitlab::Metrics::Sli module from GitLab-rails into labkit-ruby to enable reuse across multiple GitLab services, particularly for usage billing monitoring infrastructure.

Background

The Gitlab::Metrics::Sli module currently exists in GitLab-rails at lib/gitlab/metrics/sli.rb and provides Service Level Indicator (SLI) functionality for monitoring and observability.

Motivation

  • Reusability: Enable other GitLab services (like CustomersDot) to use the same SLI patterns without duplicating code
  • Consistency: Maintain consistent observability patterns across GitLab services, this means that we can also change these metrics in one place.
  • Separation of Concerns: Move shared observability utilities to a dedicated library

Implementation Considerations

  • The module should maintain backward compatibility
  • Consider namespace changes if needed (e.g., LabKit::Metrics::Sli or LabKit::Metrics::ApplicationSli)
  • Update GitLab-rails to use the labkit-ruby version once available

https://gitlab.com/groups/gitlab-org/-/epics/19128#note_2751733760

Edited by Hercules Merscher