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

#==, #hash, #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



177
178
179
180
181
182
183
184
# File 'lib/datadog/core/telemetry/metric.rb', line 177

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

#track(value) ⇒ Object



171
172
173
174
# File 'lib/datadog/core/telemetry/metric.rb', line 171

def track(value)
  values << value
  nil
end

#typeObject



167
168
169
# File 'lib/datadog/core/telemetry/metric.rb', line 167

def type
  TYPE
end