Class: Datadog::Core::Telemetry::Event::AppClientConfigurationChange Private
- Defined in:
- lib/datadog/core/telemetry/event/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.
Telemetry class for the ‘app-client-configuration-change’ event
Instance Attribute Summary collapse
- #changes ⇒ Object readonly private
- #origin ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?) private
- #configuration ⇒ Object private
- #hash ⇒ Object private
-
#initialize(changes, origin) ⇒ AppClientConfigurationChange
constructor
private
A new instance of AppClientConfigurationChange.
- #payload ⇒ Object private
- #type ⇒ Object private
Constructor Details
#initialize(changes, origin) ⇒ AppClientConfigurationChange
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.
Returns a new instance of AppClientConfigurationChange.
17 18 19 20 21 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 17 def initialize(changes, origin) super() @changes = changes @origin = origin end |
Instance Attribute Details
#changes ⇒ Object (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.
11 12 13 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 11 def changes @changes end |
#origin ⇒ Object (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.
11 12 13 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 11 def origin @origin end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
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.
52 53 54 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 52 def ==(other) other.is_a?(AppClientConfigurationChange) && other.changes == @changes && other.origin == @origin end |
#configuration ⇒ Object
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.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 27 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 |
#hash ⇒ Object
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.
58 59 60 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 58 def hash [self.class, @changes, @origin].hash end |
#payload ⇒ Object
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.
23 24 25 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 23 def payload {configuration: configuration} end |
#type ⇒ Object
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.
13 14 15 |
# File 'lib/datadog/core/telemetry/event/app_client_configuration_change.rb', line 13 def type 'app-client-configuration-change' end |