Class: StackifyRubyAPM::Config Private
- Inherits:
-
Object
- Object
- StackifyRubyAPM::Config
- Includes:
- Log
- Defined in:
- lib/stackify_apm/config.rb
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.
Constant Summary collapse
- DEFAULTS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ config_file: 'config/stackify_apm.yml', json_config_file: 'config/stackify.json', rum_script_src: 'https://stckjs.azureedge.net/stckjs.js', application_name: 'Ruby Application', environment_name: ENV['RAILS_ENV'] || ENV['RACK_ENV'], already_instrumented_flag: false, rum_auto_injection: false, rum_enabled: false, rum_cookie_path: '/', rum_cookie_name: '.Stackify.Rum', transport: StackifyRubyAPM::TRACE_LOG, instrument: true, debug_logging: false, log_path: StackifyRubyAPM::Util.host_os == 'WINDOWS' ? 'C:\ProgramData\Stackify\Ruby\debug\stackify-ruby-apm-1.log' : '/usr/local/stackify/stackify-ruby-apm/debug/stackify-ruby-apm-1.log', log_level: Logger::INFO, log_trace_path: StackifyRubyAPM::Util.host_os == 'WINDOWS' ? 'C:\ProgramData\Stackify\Ruby\log\\' : '/usr/local/stackify/stackify-ruby-apm/log/', max_queue_size: 500, # Maximum queue length of transactions before sending transactions to the APM. flush_interval_seconds: 1, # interval with which transactions should be sent to the APM. Default value: 1 seconds delay_seconds: 10, # Interval in seconds between tries max_retries: 3, # Number of attempts filter_exception_types: [], tracer_logger: nil, logger_byte_size: 50_000_000, # e.g, 50_000_000=50mb filenum_rotate: 20, debugger_byte_size: 20_000_000, # e.g, 20_000_000=20mb debugger_filenum_rotate: 3, logtime_created: 0, http_status: nil, debug_transactions: false, trace_log_age_in_hour: 60 * 60, # e.g, 60*60=1hour, 60*2=2mins check_trace_log_per_hour: '1h', # e.g, 1h=every 1hour, 2m=every 2mins source_lines_error_app_frames: 5, source_lines_span_app_frames: 5, source_lines_error_library_frames: 0, source_lines_span_library_frames: 0, span_frames_min_duration: -1, # it will collect stack traces for all spans disabled_spies: %w[json], view_paths: [], root_path: Dir.pwd, stackify_properties_file: '/usr/local/stackify/stackify-ruby-apm/stackify.properties', agent_traces_url: '/traces', unix_socket_path: '/usr/local/stackify/stackify.sock', transport_http_endpoint: 'https://localhost:10601', queue: true, lambda_handler: '', prefix_enabled: false, rum_script_url: 'https://stckjs.stackify.com/stckjs.js', rum_key: '' }.freeze
- ENV_TO_KEY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ 'STACKIFY_DEBUG' => [:bool, 'debug_logging'], 'STACKIFY_APPLICATION_NAME' => 'application_name', 'STACKIFY_ENVIRONMENT_NAME' => 'environment_name', 'RETRACE_RUMV2_ENABLED' => [:bool, 'rum_enabled'], 'STACKIFY_RUM_AUTO_INJECT' => [:bool, 'rum_auto_injection'], 'STACKIFY_RUM_SCRIPT_SRC' => 'rum_script_src', 'STACKIFY_TRANSPORT' => 'transport', 'STACKIFY_TRANSPORT_LOG_PATH' => 'log_path', 'STACKIFY_TRANSPORT_LOG_LEVEL' => [:int, 'log_level'], 'STACKIFY_TRANSPORT_SOCKET_PATH' => 'unix_socket_path', 'STACKIFY_TRANSPORT_HTTP_ENDPOINT' => 'transport_http_endpoint', 'STACKIFY_ALREADY_INSTRUMENTED_FLAG' => 'already_instrumented_flag', 'STACKIFY_INSTRUMENT' => [:bool, 'instrument'], 'STACKIFY_HOSTNAME' => 'hostname', 'STACKIFY_SOURCE_LINES_ERROR_APP_FRAMES' => [:int, 'source_lines_error_app_frames'], 'STACKIFY_SOURCE_LINES_SPAN_APP_FRAMES' => [:int, 'source_lines_span_app_frames'], 'STACKIFY_SOURCE_LINES_ERROR_LIBRARY_FRAMES' => [:int, 'source_lines_error_library_frames'], 'STACKIFY_SOURCE_LINES_SPAN_LIBRARY_FRAMES' => [:int, 'source_lines_span_library_frames'], 'STACKIFY_SPAN_FRAMES_MIN_DURATION' => [:int, 'span_frames_min_duration'], 'STACKIFY_MAX_QUEUE_SIZE' => [:int, 'max_queue_size'], 'STACKIFY_FLUSH_INTERVAL' => 'flush_interval_seconds', 'STACKIFY_DISABLED_SPIES' => [:list, 'disabled_spies'], 'STACKIFY_QUEUE' => [:bool, 'queue'], 'STACKIFY_LAMBDA_HANDLER' => 'lambda_handler', 'STACKIFY_PREFIX_ENABLED' => [:bool, 'prefix_enabled'], 'RETRACE_RUM_SCRIPT_URL' => 'rum_script_url', 'RETRACE_RUM_KEY' => 'rum_key' }.freeze
Constants included from Log
Instance Attribute Summary collapse
- #agent_traces_url ⇒ Object private
- #already_instrumented_flag ⇒ Object private
- #apm_disabled_in_rake ⇒ Object readonly private
- #application_name ⇒ Object private
- #check_trace_log_per_hour ⇒ Object private
- #client_id ⇒ Object readonly private
- #client_run_domain ⇒ Object readonly private
- #config_file ⇒ Object private
- #debug_logging ⇒ Object private
- #debug_transactions ⇒ Object private
- #debugger_byte_size ⇒ Object private
- #debugger_filenum_rotate ⇒ Object private
- #delay_seconds ⇒ Object private
- #device_id ⇒ Object readonly private
- #disabled_spies ⇒ Object private
- #enabled_environments ⇒ Object private
- #environment_name ⇒ Object private
- #filenum_rotate ⇒ Object private
- #filter_exception_types ⇒ Object private
- #flush_interval_seconds ⇒ Object private
- #hostname ⇒ Object private
- #http_status ⇒ Object private
- #instrument ⇒ Object private
- #json_config_file ⇒ Object private
- #lambda_handler ⇒ Object private
- #log_level ⇒ Object private
- #log_path ⇒ Object private
- #log_trace_path ⇒ Object private
- #logger ⇒ Object private
- #logger_byte_size ⇒ Object private
- #logtime_created ⇒ Object private
- #max_queue_size ⇒ Object private
- #max_retries ⇒ Object private
- #prefix_enabled ⇒ Object private
- #queue ⇒ Object private
- #root_path ⇒ Object private
- #rum_auto_injection ⇒ Object private
- #rum_cookie_name ⇒ Object private
- #rum_cookie_path ⇒ Object private
- #rum_enabled ⇒ Object private
- #rum_key ⇒ Object private
- #rum_script_injected ⇒ Object private
- #rum_script_src ⇒ Object private
- #rum_script_url ⇒ Object private
- #source_lines_error_app_frames ⇒ Object private
- #source_lines_error_library_frames ⇒ Object private
- #source_lines_span_app_frames ⇒ Object private
- #source_lines_span_library_frames ⇒ Object private
- #span_frames_min_duration ⇒ Object private
- #stackify_properties_file ⇒ Object private
- #trace_log_age_in_hour ⇒ Object private
- #tracer_logger ⇒ Object private
- #transport ⇒ Object private
- #transport_http_endpoint ⇒ Object private
- #unix_socket_path ⇒ Object private
- #view_paths ⇒ Object private
Instance Method Summary collapse
- #app=(app) ⇒ Object private
- #app_type?(app) ⇒ Boolean private
-
#available_spies ⇒ Object
private
available spies to use when framework is rails.
-
#debug_logger ⇒ Object
private
Default Transport.
- #enabled_spies ⇒ Object private
-
#initialize(options = {}) {|_self| ... } ⇒ Config
constructor
private
A new instance of Config.
- #prefix_spies ⇒ Object private
Methods included from Log
#debug, #error, #fatal, #info, #log, #warn
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Config
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 Config.
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/stackify_apm/config.rb', line 110 def initialize( = {}) set_defaults set_from_args() set_from_config_file set_from_env set_prefix_paths if @prefix_enabled yield self if block_given? debug_logger StackifyRubyAPM::Util.host_os == 'WINDOWS' ? load_stackify_props_windows : load_stackify_props_linux validate_apm_yml end |
Instance Attribute Details
#agent_traces_url ⇒ 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.
136 137 138 |
# File 'lib/stackify_apm/config.rb', line 136 def agent_traces_url @agent_traces_url end |
#already_instrumented_flag ⇒ 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.
130 131 132 |
# File 'lib/stackify_apm/config.rb', line 130 def already_instrumented_flag @already_instrumented_flag end |
#apm_disabled_in_rake ⇒ 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.
185 186 187 |
# File 'lib/stackify_apm/config.rb', line 185 def apm_disabled_in_rake @apm_disabled_in_rake end |
#application_name ⇒ 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.
140 141 142 |
# File 'lib/stackify_apm/config.rb', line 140 def application_name @application_name end |
#check_trace_log_per_hour ⇒ 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.
152 153 154 |
# File 'lib/stackify_apm/config.rb', line 152 def check_trace_log_per_hour @check_trace_log_per_hour end |
#client_id ⇒ 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.
183 184 185 |
# File 'lib/stackify_apm/config.rb', line 183 def client_id @client_id end |
#client_run_domain ⇒ 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.
186 187 188 |
# File 'lib/stackify_apm/config.rb', line 186 def client_run_domain @client_run_domain end |
#config_file ⇒ 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.
122 123 124 |
# File 'lib/stackify_apm/config.rb', line 122 def config_file @config_file end |
#debug_logging ⇒ 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.
146 147 148 |
# File 'lib/stackify_apm/config.rb', line 146 def debug_logging @debug_logging end |
#debug_transactions ⇒ 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.
171 172 173 |
# File 'lib/stackify_apm/config.rb', line 171 def debug_transactions @debug_transactions end |
#debugger_byte_size ⇒ 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.
149 150 151 |
# File 'lib/stackify_apm/config.rb', line 149 def debugger_byte_size @debugger_byte_size end |
#debugger_filenum_rotate ⇒ 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.
150 151 152 |
# File 'lib/stackify_apm/config.rb', line 150 def debugger_filenum_rotate @debugger_filenum_rotate end |
#delay_seconds ⇒ 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.
166 167 168 |
# File 'lib/stackify_apm/config.rb', line 166 def delay_seconds @delay_seconds end |
#device_id ⇒ 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.
184 185 186 |
# File 'lib/stackify_apm/config.rb', line 184 def device_id @device_id end |
#disabled_spies ⇒ 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.
173 174 175 |
# File 'lib/stackify_apm/config.rb', line 173 def disabled_spies @disabled_spies end |
#enabled_environments ⇒ 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.
133 134 135 |
# File 'lib/stackify_apm/config.rb', line 133 def enabled_environments @enabled_environments end |
#environment_name ⇒ 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.
124 125 126 |
# File 'lib/stackify_apm/config.rb', line 124 def environment_name @environment_name end |
#filenum_rotate ⇒ 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.
148 149 150 |
# File 'lib/stackify_apm/config.rb', line 148 def filenum_rotate @filenum_rotate end |
#filter_exception_types ⇒ 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.
169 170 171 |
# File 'lib/stackify_apm/config.rb', line 169 def filter_exception_types @filter_exception_types end |
#flush_interval_seconds ⇒ 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.
165 166 167 |
# File 'lib/stackify_apm/config.rb', line 165 def flush_interval_seconds @flush_interval_seconds end |
#hostname ⇒ 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.
141 142 143 |
# File 'lib/stackify_apm/config.rb', line 141 def hostname @hostname end |
#http_status ⇒ 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.
177 178 179 |
# File 'lib/stackify_apm/config.rb', line 177 def http_status @http_status end |
#instrument ⇒ 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.
132 133 134 |
# File 'lib/stackify_apm/config.rb', line 132 def instrument @instrument end |
#json_config_file ⇒ 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.
123 124 125 |
# File 'lib/stackify_apm/config.rb', line 123 def json_config_file @json_config_file end |
#lambda_handler ⇒ 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.
180 181 182 |
# File 'lib/stackify_apm/config.rb', line 180 def lambda_handler @lambda_handler end |
#log_level ⇒ 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.
144 145 146 |
# File 'lib/stackify_apm/config.rb', line 144 def log_level @log_level end |
#log_path ⇒ 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.
143 144 145 |
# File 'lib/stackify_apm/config.rb', line 143 def log_path @log_path end |
#log_trace_path ⇒ 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.
157 158 159 |
# File 'lib/stackify_apm/config.rb', line 157 def log_trace_path @log_trace_path end |
#logger ⇒ 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.
145 146 147 |
# File 'lib/stackify_apm/config.rb', line 145 def logger @logger end |
#logger_byte_size ⇒ 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.
147 148 149 |
# File 'lib/stackify_apm/config.rb', line 147 def logger_byte_size @logger_byte_size end |
#logtime_created ⇒ 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.
155 156 157 |
# File 'lib/stackify_apm/config.rb', line 155 def logtime_created @logtime_created end |
#max_queue_size ⇒ 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.
164 165 166 |
# File 'lib/stackify_apm/config.rb', line 164 def max_queue_size @max_queue_size end |
#max_retries ⇒ 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.
167 168 169 |
# File 'lib/stackify_apm/config.rb', line 167 def max_retries @max_retries end |
#prefix_enabled ⇒ 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.
181 182 183 |
# File 'lib/stackify_apm/config.rb', line 181 def prefix_enabled @prefix_enabled end |
#queue ⇒ 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.
179 180 181 |
# File 'lib/stackify_apm/config.rb', line 179 def queue @queue end |
#root_path ⇒ 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.
176 177 178 |
# File 'lib/stackify_apm/config.rb', line 176 def root_path @root_path end |
#rum_auto_injection ⇒ 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.
126 127 128 |
# File 'lib/stackify_apm/config.rb', line 126 def rum_auto_injection @rum_auto_injection end |
#rum_cookie_name ⇒ 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.
129 130 131 |
# File 'lib/stackify_apm/config.rb', line 129 def @rum_cookie_name end |
#rum_cookie_path ⇒ 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.
128 129 130 |
# File 'lib/stackify_apm/config.rb', line 128 def @rum_cookie_path end |
#rum_enabled ⇒ 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.
127 128 129 |
# File 'lib/stackify_apm/config.rb', line 127 def rum_enabled @rum_enabled end |
#rum_key ⇒ 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.
189 190 191 |
# File 'lib/stackify_apm/config.rb', line 189 def rum_key @rum_key end |
#rum_script_injected ⇒ 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.
131 132 133 |
# File 'lib/stackify_apm/config.rb', line 131 def rum_script_injected @rum_script_injected end |
#rum_script_src ⇒ 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.
125 126 127 |
# File 'lib/stackify_apm/config.rb', line 125 def rum_script_src @rum_script_src end |
#rum_script_url ⇒ 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.
188 189 190 |
# File 'lib/stackify_apm/config.rb', line 188 def rum_script_url @rum_script_url end |
#source_lines_error_app_frames ⇒ 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.
158 159 160 |
# File 'lib/stackify_apm/config.rb', line 158 def source_lines_error_app_frames @source_lines_error_app_frames end |
#source_lines_error_library_frames ⇒ 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.
160 161 162 |
# File 'lib/stackify_apm/config.rb', line 160 def source_lines_error_library_frames @source_lines_error_library_frames end |
#source_lines_span_app_frames ⇒ 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.
159 160 161 |
# File 'lib/stackify_apm/config.rb', line 159 def source_lines_span_app_frames @source_lines_span_app_frames end |
#source_lines_span_library_frames ⇒ 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.
161 162 163 |
# File 'lib/stackify_apm/config.rb', line 161 def source_lines_span_library_frames @source_lines_span_library_frames end |
#span_frames_min_duration ⇒ 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.
162 163 164 |
# File 'lib/stackify_apm/config.rb', line 162 def span_frames_min_duration @span_frames_min_duration end |
#stackify_properties_file ⇒ 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.
134 135 136 |
# File 'lib/stackify_apm/config.rb', line 134 def stackify_properties_file @stackify_properties_file end |
#trace_log_age_in_hour ⇒ 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.
151 152 153 |
# File 'lib/stackify_apm/config.rb', line 151 def trace_log_age_in_hour @trace_log_age_in_hour end |
#tracer_logger ⇒ 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.
154 155 156 |
# File 'lib/stackify_apm/config.rb', line 154 def tracer_logger @tracer_logger end |
#transport ⇒ 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.
135 136 137 |
# File 'lib/stackify_apm/config.rb', line 135 def transport @transport end |
#transport_http_endpoint ⇒ 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.
138 139 140 |
# File 'lib/stackify_apm/config.rb', line 138 def transport_http_endpoint @transport_http_endpoint end |
#unix_socket_path ⇒ 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.
137 138 139 |
# File 'lib/stackify_apm/config.rb', line 137 def unix_socket_path @unix_socket_path end |
#view_paths ⇒ 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.
175 176 177 |
# File 'lib/stackify_apm/config.rb', line 175 def view_paths @view_paths end |
Instance Method Details
#app=(app) ⇒ 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.
191 192 193 194 195 196 197 198 199 |
# File 'lib/stackify_apm/config.rb', line 191 def app=(app) case app_type?(app) when :rails set_rails(app) else # TODO: define custom? self.application_name = 'ruby' end end |
#app_type?(app) ⇒ Boolean
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.
201 202 203 204 205 |
# File 'lib/stackify_apm/config.rb', line 201 def app_type?(app) return :rails if defined?(::Rails) && app.is_a?(Rails::Application) nil end |
#available_spies ⇒ 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.
available spies to use when framework is rails
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/stackify_apm/config.rb', line 208 def available_spies %w[ action_dispatch mongo net_http custom_instrumenter httpclient redis sequel tilt httprb curb curb/easy curb/multi httparty stackify_logger sidekiq delayed_job faraday sucker_punch dynamo_db ] end |
#debug_logger ⇒ 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.
Default Transport
initialize default logger transport
267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/stackify_apm/config.rb', line 267 def debug_logger case @transport.downcase # For unix socket we don't create a trace log file when StackifyRubyAPM::TRACE_LOG debugger_logpath = log_path == '-' ? $stdout : log_path if (debugger_logpath == log_path) dir_name = File.dirname(debugger_logpath) Util.checkOrCreateFolder(dir_name) end logger = StackifyLogger.new(debugger_logpath, debugger_filenum_rotate, debugger_byte_size) logger.level = log_level self.logger = logger end end |
#enabled_spies ⇒ 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.
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/stackify_apm/config.rb', line 242 def enabled_spies # check if the framework is rails or sinatra sinatra_activerecord_spies = %w[ sinatra sinatra_activerecord/mysql_adapter sinatra_activerecord/postgresql_adapter sinatra_activerecord/sqlite_adapter ] new_available_spies = if defined? ::Sinatra::Base if defined? ActiveRecord available_spies + sinatra_activerecord_spies else available_spies end else available_spies end new_available_spies + prefix_spies - disabled_spies end |
#prefix_spies ⇒ 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.
232 233 234 235 236 237 238 239 240 |
# File 'lib/stackify_apm/config.rb', line 232 def prefix_spies return [] unless @prefix_enabled %w[ logger logging log4r yell ] end |