Class: Datadog::Core::Telemetry::Event
- Inherits:
-
Object
- Object
- Datadog::Core::Telemetry::Event
- Includes:
- Collector
- Defined in:
- lib/datadog/core/telemetry/event.rb
Overview
Class defining methods to construct a Telemetry event
Constant Summary collapse
- API_VERSION =
'v1'.freeze
Instance Attribute Summary collapse
-
#api_version ⇒ Object
readonly
Returns the value of attribute api_version.
Attributes included from Configuration
Instance Method Summary collapse
-
#initialize ⇒ Event
constructor
A new instance of Event.
-
#telemetry_request(request_type:, seq_id:) ⇒ Object
Forms a TelemetryRequest object based on the event request_type.
Methods included from Collector
#additional_payload, #application, #configurations, #dependencies, #host, #integrations, #runtime_id, #tracer_time
Methods included from Configuration
#configuration_for, #configure, #configure_onto, #health_metrics, #logger, #shutdown!
Constructor Details
#initialize ⇒ Event
Returns a new instance of Event.
17 18 19 |
# File 'lib/datadog/core/telemetry/event.rb', line 17 def initialize @api_version = API_VERSION end |
Instance Attribute Details
#api_version ⇒ Object (readonly)
Returns the value of attribute api_version.
14 15 16 |
# File 'lib/datadog/core/telemetry/event.rb', line 14 def api_version @api_version end |
Instance Method Details
#telemetry_request(request_type:, seq_id:) ⇒ Object
Forms a TelemetryRequest object based on the event request_type
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/datadog/core/telemetry/event.rb', line 24 def telemetry_request(request_type:, seq_id:) Telemetry::V1::TelemetryRequest.new( api_version: @api_version, application: application, host: host, payload: payload(request_type), request_type: request_type, runtime_id: runtime_id, seq_id: seq_id, tracer_time: tracer_time, ) end |