mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-06 10:19:48 +00:00
18 lines
393 B
Ruby
18 lines
393 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Metrics
|
|
module Samplers
|
|
class StatActivitySampler < BaseSampler
|
|
DEFAULT_SAMPLING_INTERVAL_SECONDS = 60
|
|
|
|
def sample
|
|
return unless ::Feature.enabled?(:sample_pg_stat_activity, Feature.current_pod, type: :ops)
|
|
|
|
Gitlab::Database::StatActivitySampler.sample
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|