lib/opentelemetry/metrics/meter.rb in opentelemetry-api-0.2.0 vs lib/opentelemetry/metrics/meter.rb in opentelemetry-api-0.3.0

- old
+ new

@@ -6,49 +6,12 @@ module OpenTelemetry module Metrics # No-op implementation of Meter. class Meter - NOOP_LABEL_SET = Object.new - private_constant(:NOOP_LABEL_SET) + def record_batch(*measurements, labels: nil); end - def record_batch(*measurements, label_set: nil); end - - # Canonicalizes labels, returning an opaque {LabelSet} object. - # - # @param [Hash<String, String>] labels - # @return [LabelSet] - def labels(labels) - NOOP_LABEL_SET - end - - # Create and return a floating point gauge. - # - # @param [String] name Name of the metric. See {Meter} for required metric name syntax. - # @param [optional String] description Descriptive text documenting the instrument. - # @param [optional String] unit Unit specified according to http://unitsofmeasure.org/ucum.html. - # @param [optional Enumerable<String>] recommended_label_keys Recommended grouping keys for this instrument. - # @param [optional Boolean] monotonic Whether the gauge accepts only monotonic updates. Defaults to false. - # @return [FloatGauge] - def create_float_gauge(name, description: nil, unit: nil, recommended_label_keys: nil, monotonic: false) - raise ArgumentError if name.nil? - - Instruments::FloatGauge.new - end - - # Create and return an integer gauge. - # - # @param [String] name Name of the metric. See {Meter} for required metric name syntax. - # @param [optional String] description Descriptive text documenting the instrument. - # @param [optional String] unit Unit specified according to http://unitsofmeasure.org/ucum.html. - # @param [optional Enumerable<String>] recommended_label_keys Recommended grouping keys for this instrument. - # @param [optional Boolean] monotonic Whether the gauge accepts only monotonic updates. Defaults to false. - # @return [IntegerGauge] - def create_integer_gauge(name, description: nil, unit: nil, recommended_label_keys: nil, monotonic: false) - raise ArgumentError if name.nil? - - Instruments::IntegerGauge.new - end + # TODO: Observers. # Create and return a floating point counter. # # @param [String] name Name of the metric. See {Meter} for required metric name syntax. # @param [optional String] description Descriptive text documenting the instrument.