Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issues_with_self_managed_prometheus_alert_events.rb « instrumentations « metrics « usage « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fdbaa65bc68ccd4a6452c4627cf8d9bde6ad0ddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module Gitlab
  module Usage
    module Metrics
      module Instrumentations
        class IssuesWithSelfManagedPrometheusAlertEvents < DatabaseMetric
          # this metric is used in IssuesCreatedFromAlertsMetric
          # do not report metric directly in service ping
          available? { false }

          operation :count

          start { Issue.minimum(:id) }
          finish { Issue.maximum(:id) }

          relation { Issue.with_self_managed_prometheus_alert_events }

          cache_start_and_finish_as :issue
        end
      end
    end
  end
end