Class: LogStash::Instrument::MetricType::Counter
- Inherits:
-
LongCounter
- Object
- LongCounter
- LogStash::Instrument::MetricType::Counter
- Defined in:
- lib/logstash/instrument/metric_type/counter.rb
Instance Method Summary collapse
- #execute(action, value = 1) ⇒ Object
-
#initialize(namespaces, key) ⇒ Counter
constructor
A new instance of Counter.
Constructor Details
#initialize(namespaces, key) ⇒ Counter
Returns a new instance of Counter.
7 8 9 10 |
# File 'lib/logstash/instrument/metric_type/counter.rb', line 7 def initialize(namespaces, key) super(key.to_s) end |
Instance Method Details
#execute(action, value = 1) ⇒ Object
12 13 14 |
# File 'lib/logstash/instrument/metric_type/counter.rb', line 12 def execute(action, value = 1) send(action, value) end |