Class: Datadog::Core::Telemetry::Event::SynthAppClientConfigurationChange Private

Inherits:
AppStarted
  • Object
show all
Defined in:
lib/datadog/core/telemetry/event/synth_app_client_configuration_change.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.

app-client-configuration-change event emitted instead of app-started event for telemetry startups other than the initial one in a process.

dd-trace-rb generally creates a new component tree whenever the tracer is reconfigured via Datadog.configure (with some components potentially reused, if their configuration has not changed). Telemetry system tests on the other hand expect there to be one “tracer” per process, and do not permit multiple app-started events to be emitted.

To resolve this conflict, we replace second and onward app-started events with app-client-configuration-change events. To avoid diffing configuration, we send all parameters that are sent in app-started event.

It’s a “quick fix” on top of a not-so-quick fix that omitted second and subsequent app-started (and app-closing) events in the first place, and only works with the existing hackery of app-started and app-closing events.

Instance Method Summary collapse

Methods inherited from AppStarted

#initialize

Methods inherited from Base

#==, #hash

Constructor Details

This class inherits a constructor from Datadog::Core::Telemetry::Event::AppStarted

Instance Method Details

#payloadObject

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.



34
35
36
37
38
# File 'lib/datadog/core/telemetry/event/synth_app_client_configuration_change.rb', line 34

def payload
  {
    configuration: configuration,
  }
end

#typeObject

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/synth_app_client_configuration_change.rb', line 30

def type
  'app-client-configuration-change'
end