Class: Datadog::Core::Telemetry::Event::MessageBatch
- Inherits:
-
Object
- Object
- Datadog::Core::Telemetry::Event::MessageBatch
- Defined in:
- lib/datadog/core/telemetry/event.rb
Overview
Telemetry class for the ‘message-batch’ event
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
-
#initialize(events) ⇒ MessageBatch
constructor
A new instance of MessageBatch.
- #payload ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(events) ⇒ MessageBatch
Returns a new instance of MessageBatch.
386 387 388 |
# File 'lib/datadog/core/telemetry/event.rb', line 386 def initialize(events) @events = events end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
380 381 382 |
# File 'lib/datadog/core/telemetry/event.rb', line 380 def events @events end |
Instance Method Details
#payload ⇒ Object
390 391 392 393 394 395 396 397 |
# File 'lib/datadog/core/telemetry/event.rb', line 390 def payload @events.map do |event| { request_type: event.type, payload: event.payload, } end end |
#type ⇒ Object
382 383 384 |
# File 'lib/datadog/core/telemetry/event.rb', line 382 def type 'message-batch' end |