Sha256: 6409dcab0cdc9dd6830e658cdfbc88c58871fddff517fd6596a5a0e058b5fef4

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

module DDTelemetry
  class Summary < Metric
    def observe(value, label)
      validate_label(label)
      basic_metric_for(label, BasicSummary).observe(value)
    end

    def get(label)
      validate_label(label)
      values = basic_metric_for(label, BasicSummary).values
      DDTelemetry::Stats.new(values)
    end

    def to_s
      DDTelemetry::Printer.new.summary_to_s(self)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ddtelemetry-1.0.0a3 lib/ddtelemetry/summary.rb