Class: Datadog::Core::Telemetry::Event::AppClientConfigurationChange
- Defined in:
- lib/datadog/core/telemetry/event.rb
Overview
Telemetry class for the ‘app-client-configuration-change’ event
Instance Method Summary collapse
- #configuration ⇒ Object
-
#initialize(changes, origin) ⇒ AppClientConfigurationChange
constructor
A new instance of AppClientConfigurationChange.
- #payload ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(changes, origin) ⇒ AppClientConfigurationChange
Returns a new instance of AppClientConfigurationChange.
270 271 272 273 274 |
# File 'lib/datadog/core/telemetry/event.rb', line 270 def initialize(changes, origin) super() @changes = changes @origin = origin end |
Instance Method Details
#configuration ⇒ Object
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/datadog/core/telemetry/event.rb', line 280 def configuration config = Datadog.configuration seq_id = Event.configuration_sequence.next res = @changes.map do |name, value| { name: name, value: value, origin: @origin, seq_id: seq_id, } end unless config.dig('appsec', 'sca_enabled').nil? res << { name: 'appsec.sca_enabled', value: config.appsec.sca_enabled, origin: 'code', seq_id: seq_id, } end res end |
#payload ⇒ Object
276 277 278 |
# File 'lib/datadog/core/telemetry/event.rb', line 276 def payload { configuration: configuration } end |
#type ⇒ Object
266 267 268 |
# File 'lib/datadog/core/telemetry/event.rb', line 266 def type 'app-client-configuration-change' end |