Class: Datadog::Core::Telemetry::Event::GenerateMetrics Private
- Defined in:
- lib/datadog/core/telemetry/event/generate_metrics.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Telemetry class for the ‘generate-metrics’ event
Direct Known Subclasses
Instance Attribute Summary collapse
- #metric_series ⇒ Object readonly private
- #namespace ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?) private
- #hash ⇒ Object private
-
#initialize(namespace, metric_series) ⇒ GenerateMetrics
constructor
private
A new instance of GenerateMetrics.
- #payload ⇒ Object private
- #type ⇒ Object private
Constructor Details
#initialize(namespace, metric_series) ⇒ GenerateMetrics
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of GenerateMetrics.
17 18 19 20 21 |
# File 'lib/datadog/core/telemetry/event/generate_metrics.rb', line 17 def initialize(namespace, metric_series) super() @namespace = namespace @metric_series = metric_series end |
Instance Attribute Details
#metric_series ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/datadog/core/telemetry/event/generate_metrics.rb', line 11 def metric_series @metric_series end |
#namespace ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/datadog/core/telemetry/event/generate_metrics.rb', line 11 def namespace @namespace end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/datadog/core/telemetry/event/generate_metrics.rb', line 30 def ==(other) other.is_a?(GenerateMetrics) && other.namespace == @namespace && other.metric_series == @metric_series end |
#hash ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/datadog/core/telemetry/event/generate_metrics.rb', line 36 def hash [self.class, @namespace, @metric_series].hash end |
#payload ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 |
# File 'lib/datadog/core/telemetry/event/generate_metrics.rb', line 23 def payload { namespace: @namespace, series: @metric_series.map(&:to_h) } end |
#type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/datadog/core/telemetry/event/generate_metrics.rb', line 13 def type 'generate-metrics' end |