Class: OpenTelemetry::Metrics::Instruments::FloatCounter

Inherits:
Object
  • Object
show all
Defined in:
lib/opentelemetry/metrics/instruments.rb

Overview

A float counter instrument.

Instance Method Summary collapse

Instance Method Details

#add(value, labels = {}) ⇒ Object



22
# File 'lib/opentelemetry/metrics/instruments.rb', line 22

def add(value, labels = {}); end

#handle(labels = {}) ⇒ Handles::FloatCounter

Obtain a handle from the instrument and labels.

Parameters:

  • labels (optional Hash<String, String>) (defaults to: {})

    A Hash of Strings.

Returns:



28
29
30
# File 'lib/opentelemetry/metrics/instruments.rb', line 28

def handle(labels = {})
  Handles::FloatCounter.new
end

#measurement(value) ⇒ Object, Measurement

Return a measurement to be recorded via Meter#record_batch.

Parameters:

  • value (Float)

Returns:

  • (Object, Measurement)


36
37
38
# File 'lib/opentelemetry/metrics/instruments.rb', line 36

def measurement(value)
  NOOP_MEASUREMENT
end