Class: Airbrake::RemoteSettings::Callback Private

Inherits:
Object
  • Object
show all
Defined in:
lib/airbrake-ruby/remote_settings/callback.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.

Callback is a class that provides a callback for the config poller, which updates the local config according to the data.

Since:

  • v5.0.2

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Callback

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 Callback.

Since:

  • v5.0.2



9
10
11
12
13
# File 'lib/airbrake-ruby/remote_settings/callback.rb', line 9

def initialize(config)
  @config = config
  @orig_error_notifications = config.error_notifications
  @orig_performance_stats = config.performance_stats
end

Instance Method Details

#call(data) ⇒ void

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.

This method returns an undefined value.

Parameters:

Since:

  • v5.0.2



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/airbrake-ruby/remote_settings/callback.rb', line 17

def call(data)
  @config.logger.debug do
    "#{LOG_LABEL} applying remote settings: #{data.to_h}"
  end

  @config.error_host = data.error_host if data.error_host
  @config.apm_host = data.apm_host if data.apm_host

  process_error_notifications(data)
  process_performance_stats(data)
end