Class: Unleash::ImpactMetrics

Inherits:
Object
  • Object
show all
Defined in:
lib/unleash/impact_metrics.rb

Instance Method Summary collapse

Constructor Details

#initialize(engine, app_name) ⇒ ImpactMetrics

Returns a new instance of ImpactMetrics.



3
4
5
6
# File 'lib/unleash/impact_metrics.rb', line 3

def initialize(engine, app_name)
  @engine = engine
  @app_name = app_name
end

Instance Method Details

#define_counter(name, help_text) ⇒ Object



8
9
10
# File 'lib/unleash/impact_metrics.rb', line 8

def define_counter(name, help_text)
  @engine.define_counter(name, help_text)
end

#define_gauge(name, help_text) ⇒ Object



16
17
18
# File 'lib/unleash/impact_metrics.rb', line 16

def define_gauge(name, help_text)
  @engine.define_gauge(name, help_text)
end

#define_histogram(name, help_text, buckets = nil) ⇒ Object



24
25
26
# File 'lib/unleash/impact_metrics.rb', line 24

def define_histogram(name, help_text, buckets = nil)
  @engine.define_histogram(name, help_text, buckets)
end

#increment_counter(name, value = 1) ⇒ Object



12
13
14
# File 'lib/unleash/impact_metrics.rb', line 12

def increment_counter(name, value = 1)
  @engine.inc_counter(name, value, base_labels)
end

#observe_histogram(name, value) ⇒ Object



28
29
30
# File 'lib/unleash/impact_metrics.rb', line 28

def observe_histogram(name, value)
  @engine.observe_histogram(name, value, base_labels)
end

#update_gauge(name, value) ⇒ Object



20
21
22
# File 'lib/unleash/impact_metrics.rb', line 20

def update_gauge(name, value)
  @engine.set_gauge(name, value, base_labels)
end