Module: Rookout::Config

Defined in:
lib/rookout/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.agent_com_configuration_command_thread_nameObject

Returns the value of attribute agent_com_configuration_command_thread_name.



22
23
24
# File 'lib/rookout/config.rb', line 22

def agent_com_configuration_command_thread_name
  @agent_com_configuration_command_thread_name
end

.agent_com_flush_timeoutObject

Returns the value of attribute agent_com_flush_timeout.



28
29
30
# File 'lib/rookout/config.rb', line 28

def agent_com_flush_timeout
  @agent_com_flush_timeout
end

.agent_com_max_message_limitObject

Returns the value of attribute agent_com_max_message_limit.



23
24
25
# File 'lib/rookout/config.rb', line 23

def agent_com_max_message_limit
  @agent_com_max_message_limit
end

.agent_com_max_queue_messages_lengthObject

Returns the value of attribute agent_com_max_queue_messages_length.



24
25
26
# File 'lib/rookout/config.rb', line 24

def agent_com_max_queue_messages_length
  @agent_com_max_queue_messages_length
end

.agent_com_max_queued_messagesObject

Returns the value of attribute agent_com_max_queued_messages.



29
30
31
# File 'lib/rookout/config.rb', line 29

def agent_com_max_queued_messages
  @agent_com_max_queued_messages
end

.agent_com_ping_intervalObject

Returns the value of attribute agent_com_ping_interval.



26
27
28
# File 'lib/rookout/config.rb', line 26

def agent_com_ping_interval
  @agent_com_ping_interval
end

.agent_com_ping_timeoutObject

Returns the value of attribute agent_com_ping_timeout.



27
28
29
# File 'lib/rookout/config.rb', line 27

def agent_com_ping_timeout
  @agent_com_ping_timeout
end

.agent_com_timeoutObject

Returns the value of attribute agent_com_timeout.



25
26
27
# File 'lib/rookout/config.rb', line 25

def agent_com_timeout
  @agent_com_timeout
end

.backoff_factorObject

Returns the value of attribute backoff_factor.



39
40
41
# File 'lib/rookout/config.rb', line 39

def backoff_factor
  @backoff_factor
end

.backoff_max_timeObject

Returns the value of attribute backoff_max_time.



41
42
43
# File 'lib/rookout/config.rb', line 41

def backoff_max_time
  @backoff_max_time
end

.backoff_reset_timeObject

Returns the value of attribute backoff_reset_time.



40
41
42
# File 'lib/rookout/config.rb', line 40

def backoff_reset_time
  @backoff_reset_time
end

.debugObject

Returns the value of attribute debug.



8
9
10
# File 'lib/rookout/config.rb', line 8

def debug
  @debug
end

.global_rate_limitObject

Returns the value of attribute global_rate_limit.



85
86
87
# File 'lib/rookout/config.rb', line 85

def global_rate_limit
  @global_rate_limit
end

.global_rate_limit_quotaObject

Returns the value of attribute global_rate_limit_quota.



83
84
85
# File 'lib/rookout/config.rb', line 83

def global_rate_limit_quota
  @global_rate_limit_quota
end

.global_rate_limit_window_sizeObject

Returns the value of attribute global_rate_limit_window_size.



84
85
86
# File 'lib/rookout/config.rb', line 84

def global_rate_limit_window_size
  @global_rate_limit_window_size
end

.instrumentation_max_aug_timeObject

Returns the value of attribute instrumentation_max_aug_time.



57
58
59
# File 'lib/rookout/config.rb', line 57

def instrumentation_max_aug_time
  @instrumentation_max_aug_time
end

.logger_filenameObject

Returns the value of attribute logger_filename.



14
15
16
# File 'lib/rookout/config.rb', line 14

def logger_filename
  @logger_filename
end

.logger_log_levelObject

Returns the value of attribute logger_log_level.



16
17
18
# File 'lib/rookout/config.rb', line 16

def logger_log_level
  @logger_log_level
end

.logger_log_to_stderrObject

Returns the value of attribute logger_log_to_stderr.



15
16
17
# File 'lib/rookout/config.rb', line 15

def logger_log_to_stderr
  @logger_log_to_stderr
end

.min_rate_limit_value_nsObject

Returns the value of attribute min_rate_limit_value_ns.



87
88
89
# File 'lib/rookout/config.rb', line 87

def min_rate_limit_value_ns
  @min_rate_limit_value_ns
end

.output_bucket_refresh_rateObject

Returns the value of attribute output_bucket_refresh_rate.



50
51
52
# File 'lib/rookout/config.rb', line 50

def output_bucket_refresh_rate
  @output_bucket_refresh_rate
end

.output_max_aug_messagesObject

Returns the value of attribute output_max_aug_messages.



48
49
50
# File 'lib/rookout/config.rb', line 48

def output_max_aug_messages
  @output_max_aug_messages
end

.output_max_log_itemsObject

Returns the value of attribute output_max_log_items.



49
50
51
# File 'lib/rookout/config.rb', line 49

def output_max_log_items
  @output_max_log_items
end

.output_max_status_updatesObject

Returns the value of attribute output_max_status_updates.



47
48
49
# File 'lib/rookout/config.rb', line 47

def output_max_status_updates
  @output_max_status_updates
end

.protobuf_version2Object

Returns the value of attribute protobuf_version2.



75
76
77
# File 'lib/rookout/config.rb', line 75

def protobuf_version2
  @protobuf_version2
end

.quietObject

Returns the value of attribute quiet.



9
10
11
# File 'lib/rookout/config.rb', line 9

def quiet
  @quiet
end

.rookout_commitObject

Returns the value of attribute rookout_commit.



70
71
72
# File 'lib/rookout/config.rb', line 70

def rookout_commit
  @rookout_commit
end

.rookout_versionObject

Returns the value of attribute rookout_version.



69
70
71
# File 'lib/rookout/config.rb', line 69

def rookout_version
  @rookout_version
end

.true_valuesObject

Returns the value of attribute true_values.



79
80
81
# File 'lib/rookout/config.rb', line 79

def true_values
  @true_values
end

.user_git_commitObject

Returns the value of attribute user_git_commit.



61
62
63
# File 'lib/rookout/config.rb', line 61

def user_git_commit
  @user_git_commit
end

.user_git_originObject

Returns the value of attribute user_git_origin.



62
63
64
# File 'lib/rookout/config.rb', line 62

def user_git_origin
  @user_git_origin
end

.user_git_sourcesObject

Returns the value of attribute user_git_sources.



63
64
65
# File 'lib/rookout/config.rb', line 63

def user_git_sources
  @user_git_sources
end

.using_global_rate_limiterObject

Returns the value of attribute using_global_rate_limiter.



86
87
88
# File 'lib/rookout/config.rb', line 86

def using_global_rate_limiter
  @using_global_rate_limiter
end

Class Method Details

.update_config(configuration) ⇒ Object



95
96
97
98
# File 'lib/rookout/config.rb', line 95

def update_config configuration
  update_var2_config configuration
  update_global_rate_limit_config configuration
end

.update_global_rate_limit_config(configuration) ⇒ Object



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/rookout/config.rb', line 113

def update_global_rate_limit_config configuration
  global_rate_limit = ENV["ROOKOUT_GLOBAL_RATE_LIMIT"]
  if global_rate_limit.nil?
    quota = configuration["RUBY_GLOBAL_RATE_LIMIT_QUOTA_MS"]
    window_size = configuration["RUBY_GLOBAL_RATE_LIMIT_WINDOW_SIZE_MS"]

    if quota != "" && !quota.nil? && window_size != "" && !window_size.nil?
      global_rate_limit = "#{quota}/#{window_size}"
    end
  end

  return if global_rate_limit.nil? || global_rate_limit == ""

  @global_rate_limit = global_rate_limit
  Logger.instance.info "Updating global rate limit to: #{global_rate_limit}"
end

.update_var2_config(configuration) ⇒ Object



100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/rookout/config.rb', line 100

def update_var2_config configuration
  is_config_proto2 = configuration["RUBY_PROTOBUF_VERSION_2"]
  return if is_config_proto2.nil?
  is_env_proto2 = ENV["ROOKOUT_Protobuf_Version2"]
  if is_env_proto2.nil?
    @protobuf_version2 = true if @true_values.include? is_config_proto2
  elsif @true_values.include? is_env_proto2
    Logger.instance.debug "ROOKOUT_Protobuf_Version2 env is preset: #{is_env_proto2}"
    @protobuf_version2 = true
  end
  Logger.instance.info "Updating ROOKOUT_Protobuf_Version2 value to: #{@protobuf_version2}"
end