Class: Datadog::Core::Telemetry::Metric::Distribution

Inherits:
Base
  • Object
show all
Defined in:
lib/datadog/core/telemetry/metric.rb

Overview

Distribution metric represents the global statistical distribution of a set of values.

Constant Summary collapse

TYPE =
'distributions'

Instance Attribute Summary

Attributes inherited from Base

#common, #name, #tags, #values

Instance Method Summary collapse

Methods inherited from Base

#id, #initialize

Constructor Details

This class inherits a constructor from Datadog::Core::Telemetry::Metric::Base

Instance Method Details

#to_hObject

distribution metric data does not have type field



155
156
157
158
159
160
161
162
# File 'lib/datadog/core/telemetry/metric.rb', line 155

def to_h
  {
    metric: name,
    points: values,
    tags: tags,
    common: common
  }
end

#track(value) ⇒ Object



149
150
151
152
# File 'lib/datadog/core/telemetry/metric.rb', line 149

def track(value)
  values << value
  nil
end

#typeObject



145
146
147
# File 'lib/datadog/core/telemetry/metric.rb', line 145

def type
  TYPE
end