Class: Rubino::Metrics::Proxy
- Inherits:
-
Object
- Object
- Rubino::Metrics::Proxy
- Defined in:
- lib/rubino/metrics.rb
Overview
Instance Method Summary collapse
- #increment(by: 1) ⇒ Object
-
#initialize(metric, labels) ⇒ Proxy
constructor
A new instance of Proxy.
- #observe(value) ⇒ Object
Constructor Details
#initialize(metric, labels) ⇒ Proxy
Returns a new instance of Proxy.
122 123 124 125 |
# File 'lib/rubino/metrics.rb', line 122 def initialize(metric, labels) @metric = metric @labels = labels end |
Instance Method Details
#increment(by: 1) ⇒ Object
127 128 129 |
# File 'lib/rubino/metrics.rb', line 127 def increment(by: 1) @metric.increment(by: by, **@labels) end |
#observe(value) ⇒ Object
131 132 133 |
# File 'lib/rubino/metrics.rb', line 131 def observe(value) @metric.observe(value, **@labels) end |