Class: Datadog::Core::Telemetry::Event::GenerateMetrics
- Defined in:
- lib/datadog/core/telemetry/event.rb
Overview
Telemetry class for the ‘generate-metrics’ event
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(namespace, metric_series) ⇒ GenerateMetrics
constructor
A new instance of GenerateMetrics.
- #payload ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(namespace, metric_series) ⇒ GenerateMetrics
Returns a new instance of GenerateMetrics.
326 327 328 329 330 |
# File 'lib/datadog/core/telemetry/event.rb', line 326 def initialize(namespace, metric_series) super() @namespace = namespace @metric_series = metric_series end |
Instance Method Details
#payload ⇒ Object
332 333 334 335 336 337 |
# File 'lib/datadog/core/telemetry/event.rb', line 332 def payload { namespace: @namespace, series: @metric_series.map(&:to_h) } end |
#type ⇒ Object
322 323 324 |
# File 'lib/datadog/core/telemetry/event.rb', line 322 def type 'generate-metrics' end |