Class: Datadog::DI::SnapshotEvent Private
- Inherits:
-
Object
- Object
- Datadog::DI::SnapshotEvent
- Defined in:
- lib/datadog/di/snapshot_event.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.
A snapshot payload queued for sending to the agent, paired with the guardrails event type of the probe that produced it, so drop metrics can be tagged with the probe's classification.
Instance Attribute Summary collapse
-
#event_type ⇒ String
readonly
private
The guardrails event type of the probe that produced the payload.
-
#payload ⇒ Hash
readonly
private
The snapshot payload to send to the agent.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
private
Compares two events by payload and event type.
-
#initialize(payload:, event_type:) ⇒ void
constructor
private
Initializes the event.
Constructor Details
#initialize(payload:, event_type:) ⇒ void
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.
Initializes the event.
15 16 17 18 |
# File 'lib/datadog/di/snapshot_event.rb', line 15 def initialize(payload:, event_type:) @payload = payload @event_type = event_type end |
Instance Attribute Details
#event_type ⇒ String (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.
The guardrails event type of the probe that produced the payload.
26 27 28 |
# File 'lib/datadog/di/snapshot_event.rb', line 26 def event_type @event_type end |
#payload ⇒ Hash (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.
The snapshot payload to send to the agent.
22 23 24 |
# File 'lib/datadog/di/snapshot_event.rb', line 22 def payload @payload end |
Instance Method Details
#==(other) ⇒ Boolean
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.
Compares two events by payload and event type.
33 34 35 |
# File 'lib/datadog/di/snapshot_event.rb', line 33 def ==(other) other.is_a?(SnapshotEvent) && other.payload == payload && other.event_type == event_type end |