gitlab-org--gitlab-foss/lib/gitlab/metrics/dummy_metric.rb

30 lines
479 B
Ruby
Raw Normal View History

module Gitlab
module Metrics
# Mocks ::Prometheus::Client::Metric and all derived metrics
class DummyMetric
def get(*args)
raise NotImplementedError
end
def values(*args)
raise NotImplementedError
end
# counter
def increment(*args)
# noop
end
# gauge
def set(*args)
# noop
end
# histogram / summary
def observe(*args)
# noop
end
end
end
end