aboutsummaryrefslogtreecommitdiff
path: root/examples/test_fixed.rb
blob: e6be609b2c65d4da3b3c46d3cbd83f8e884d2e60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class TestFixed
  def initialize(collector, config)
    @collector = collector
    @config = config
  end

  def raid
    # Clean up any previously reported metrics
    # to prevent stale labelsets
    @collector.redact!("fixed_value")

    # Report new metrics
    @collector.report!(
      "fixed_value",
      4,
      help: "A fixed value",
      type: "gauge"
    )
  end
end