Class: Lapsoss::Configuration
- Inherits:
-
Object
- Object
- Lapsoss::Configuration
- Includes:
- Validators
- Defined in:
- lib/lapsoss/configuration.rb
Instance Attribute Summary collapse
-
#adapter_configs ⇒ Object
readonly
Returns the value of attribute adapter_configs.
-
#async ⇒ Object
Returns the value of attribute async.
-
#backtrace_context_lines ⇒ Object
Returns the value of attribute backtrace_context_lines.
-
#backtrace_enable_code_context ⇒ Object
Returns the value of attribute backtrace_enable_code_context.
-
#backtrace_exclude_patterns ⇒ Object
Returns the value of attribute backtrace_exclude_patterns.
-
#backtrace_in_app_patterns ⇒ Object
Returns the value of attribute backtrace_in_app_patterns.
-
#backtrace_max_frames ⇒ Object
Returns the value of attribute backtrace_max_frames.
-
#backtrace_strip_load_path ⇒ Object
Returns the value of attribute backtrace_strip_load_path.
-
#before_send ⇒ Object
Returns the value of attribute before_send.
-
#capture_request_context ⇒ Object
Returns the value of attribute capture_request_context.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#default_context ⇒ Object
readonly
Returns the value of attribute default_context.
-
#enable_pipeline ⇒ Object
Returns the value of attribute enable_pipeline.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#error_handler ⇒ Object
Returns the value of attribute error_handler.
-
#exclusion_filter ⇒ Object
Returns the value of attribute exclusion_filter.
-
#fingerprint_callback ⇒ Object
Returns the value of attribute fingerprint_callback.
-
#fingerprint_include_environment ⇒ Object
Returns the value of attribute fingerprint_include_environment.
-
#fingerprint_patterns ⇒ Object
Returns the value of attribute fingerprint_patterns.
-
#force_sync_http ⇒ Object
Returns the value of attribute force_sync_http.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#normalize_fingerprint_ids ⇒ Object
Returns the value of attribute normalize_fingerprint_ids.
-
#normalize_fingerprint_paths ⇒ Object
Returns the value of attribute normalize_fingerprint_paths.
-
#pipeline_builder ⇒ Object
Returns the value of attribute pipeline_builder.
-
#randomize_scrub_length ⇒ Object
Returns the value of attribute randomize_scrub_length.
-
#release ⇒ Object
Returns the value of attribute release.
-
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
-
#sampling_strategy ⇒ Object
Returns the value of attribute sampling_strategy.
-
#scrub_all ⇒ Object
Returns the value of attribute scrub_all.
-
#scrub_fields ⇒ Object
Returns the value of attribute scrub_fields.
-
#skip_rails_cache_errors ⇒ Object
Returns the value of attribute skip_rails_cache_errors.
-
#transport_backoff_multiplier ⇒ Object
Returns the value of attribute transport_backoff_multiplier.
-
#transport_initial_backoff ⇒ Object
Returns the value of attribute transport_initial_backoff.
-
#transport_jitter ⇒ Object
Returns the value of attribute transport_jitter.
-
#transport_max_backoff ⇒ Object
Returns the value of attribute transport_max_backoff.
-
#transport_max_retries ⇒ Object
Returns the value of attribute transport_max_retries.
-
#transport_ssl_verify ⇒ Object
Returns the value of attribute transport_ssl_verify.
-
#transport_timeout ⇒ Object
Returns the value of attribute transport_timeout.
-
#whitelist_fields ⇒ Object
Returns the value of attribute whitelist_fields.
Instance Method Summary collapse
-
#adapter_names ⇒ Object
Get configured adapter names.
-
#adapters_configured? ⇒ Boolean
Check if any adapters are configured.
-
#apply! ⇒ Object
Apply configuration by registering all adapters.
- #async? ⇒ Boolean
- #clear! ⇒ Object
-
#configure_pipeline {|@pipeline_builder| ... } ⇒ Object
Pipeline configuration.
-
#configure_sampling(strategy = nil, &block) ⇒ Object
Sampling configuration.
- #create_sampling_strategy ⇒ Object
- #debug? ⇒ Boolean
- #default_extra ⇒ Object
-
#default_extra=(extra) ⇒ Object
Default extra context setter/getter.
- #default_tags ⇒ Object
-
#default_tags=(tags) ⇒ Object
Default tags setter/getter.
- #default_user ⇒ Object
-
#default_user=(user) ⇒ Object
Default user setter/getter.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #pipeline ⇒ Object
- #pipeline=(value) ⇒ Object
-
#register_adapter(name, type, **settings) ⇒ Object
Register a named adapter configuration.
-
#use_appsignal(name: :appsignal, **settings) ⇒ Object
Convenience method for AppSignal.
-
#use_bugsnag(name: :bugsnag, **settings) ⇒ Object
Backwards compatibility for Bugsnag.
-
#use_insight_hub(name: :insight_hub, **settings) ⇒ Object
Convenience method for Insight Hub.
-
#use_jaeger(name: :jaeger, **settings) ⇒ Object
Convenience method for Jaeger (OTLP-compatible).
-
#use_logger(name: :logger, **settings) ⇒ Object
Convenience method for Logger.
-
#use_openobserve(name: :openobserve, **settings) ⇒ Object
Convenience method for OpenObserve.
-
#use_otlp(name: :otlp, **settings) ⇒ Object
Convenience method for OTLP (OpenTelemetry Protocol) Works with SigNoz, Jaeger, Tempo, Honeycomb, etc.
-
#use_rollbar(name: :rollbar, **settings) ⇒ Object
Convenience method for Rollbar.
-
#use_sentry(name: :sentry, **settings) ⇒ Object
Convenience method for Sentry.
-
#use_signoz(name: :signoz, **settings) ⇒ Object
Convenience method for SigNoz (OTLP-compatible).
-
#use_telebugs(name: :telebugs, **settings) ⇒ Object
Convenience method for Telebugs (Sentry-compatible).
-
#use_tempo(name: :tempo, **settings) ⇒ Object
Convenience method for Grafana Tempo (OTLP-compatible).
-
#validate! ⇒ Object
Configuration validation - just log warnings, don’t fail.
Methods included from Validators
logger, validate_api_key!, validate_callable!, validate_dsn!, validate_environment!, validate_presence!, validate_retries!, validate_sample_rate!, validate_timeout!, validate_url!
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/lapsoss/configuration.rb', line 21 def initialize @adapter_configs = {} @async = true @logger = Logger.new(nil) # Default null logger @environment = nil @enabled = true @release = nil @debug = false @before_send = nil @sample_rate = 1.0 @default_context = {} @error_handler = nil @scrub_fields = nil # Will use defaults from Scrubber @scrub_all = false @whitelist_fields = [] @randomize_scrub_length = false # Transport reliability settings @transport_timeout = 5 @transport_max_retries = 3 @transport_initial_backoff = 1.0 @transport_max_backoff = 64.0 @transport_backoff_multiplier = 2.0 @transport_jitter = true @transport_ssl_verify = true # Fingerprinting settings @fingerprint_callback = nil @fingerprint_patterns = nil # Will use defaults from Fingerprinter @normalize_fingerprint_paths = true @normalize_fingerprint_ids = true @fingerprint_include_environment = false # Backtrace processing settings @backtrace_context_lines = 3 @backtrace_in_app_patterns = [] @backtrace_exclude_patterns = [] @backtrace_strip_load_path = true @backtrace_max_frames = 100 @backtrace_enable_code_context = true # Pipeline settings @enable_pipeline = true @pipeline_builder = nil @pipeline = nil @sampling_strategy = nil # Rails error filtering @skip_rails_cache_errors = true # HTTP client settings @force_sync_http = false # Capture request context in middleware @capture_request_context = true # Exclusion filter @exclusion_filter = nil end |
Instance Attribute Details
#adapter_configs ⇒ Object (readonly)
Returns the value of attribute adapter_configs.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def adapter_configs @adapter_configs end |
#async ⇒ Object
Returns the value of attribute async.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def async @async end |
#backtrace_context_lines ⇒ Object
Returns the value of attribute backtrace_context_lines.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def backtrace_context_lines @backtrace_context_lines end |
#backtrace_enable_code_context ⇒ Object
Returns the value of attribute backtrace_enable_code_context.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def backtrace_enable_code_context @backtrace_enable_code_context end |
#backtrace_exclude_patterns ⇒ Object
Returns the value of attribute backtrace_exclude_patterns.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def backtrace_exclude_patterns @backtrace_exclude_patterns end |
#backtrace_in_app_patterns ⇒ Object
Returns the value of attribute backtrace_in_app_patterns.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def backtrace_in_app_patterns @backtrace_in_app_patterns end |
#backtrace_max_frames ⇒ Object
Returns the value of attribute backtrace_max_frames.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def backtrace_max_frames @backtrace_max_frames end |
#backtrace_strip_load_path ⇒ Object
Returns the value of attribute backtrace_strip_load_path.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def backtrace_strip_load_path @backtrace_strip_load_path end |
#before_send ⇒ Object
Returns the value of attribute before_send.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def before_send @before_send end |
#capture_request_context ⇒ Object
Returns the value of attribute capture_request_context.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def capture_request_context @capture_request_context end |
#debug ⇒ Object
Returns the value of attribute debug.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def debug @debug end |
#default_context ⇒ Object (readonly)
Returns the value of attribute default_context.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def default_context @default_context end |
#enable_pipeline ⇒ Object
Returns the value of attribute enable_pipeline.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def enable_pipeline @enable_pipeline end |
#enabled ⇒ Object
Returns the value of attribute enabled.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def enabled @enabled end |
#environment ⇒ Object
Returns the value of attribute environment.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def environment @environment end |
#error_handler ⇒ Object
Returns the value of attribute error_handler.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def error_handler @error_handler end |
#exclusion_filter ⇒ Object
Returns the value of attribute exclusion_filter.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def exclusion_filter @exclusion_filter end |
#fingerprint_callback ⇒ Object
Returns the value of attribute fingerprint_callback.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def fingerprint_callback @fingerprint_callback end |
#fingerprint_include_environment ⇒ Object
Returns the value of attribute fingerprint_include_environment.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def fingerprint_include_environment @fingerprint_include_environment end |
#fingerprint_patterns ⇒ Object
Returns the value of attribute fingerprint_patterns.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def fingerprint_patterns @fingerprint_patterns end |
#force_sync_http ⇒ Object
Returns the value of attribute force_sync_http.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def force_sync_http @force_sync_http end |
#logger ⇒ Object
Returns the value of attribute logger.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def logger @logger end |
#normalize_fingerprint_ids ⇒ Object
Returns the value of attribute normalize_fingerprint_ids.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def normalize_fingerprint_ids @normalize_fingerprint_ids end |
#normalize_fingerprint_paths ⇒ Object
Returns the value of attribute normalize_fingerprint_paths.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def normalize_fingerprint_paths @normalize_fingerprint_paths end |
#pipeline_builder ⇒ Object
Returns the value of attribute pipeline_builder.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def pipeline_builder @pipeline_builder end |
#randomize_scrub_length ⇒ Object
Returns the value of attribute randomize_scrub_length.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def randomize_scrub_length @randomize_scrub_length end |
#release ⇒ Object
Returns the value of attribute release.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def release @release end |
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def sample_rate @sample_rate end |
#sampling_strategy ⇒ Object
Returns the value of attribute sampling_strategy.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def sampling_strategy @sampling_strategy end |
#scrub_all ⇒ Object
Returns the value of attribute scrub_all.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def scrub_all @scrub_all end |
#scrub_fields ⇒ Object
Returns the value of attribute scrub_fields.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def scrub_fields @scrub_fields end |
#skip_rails_cache_errors ⇒ Object
Returns the value of attribute skip_rails_cache_errors.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def skip_rails_cache_errors @skip_rails_cache_errors end |
#transport_backoff_multiplier ⇒ Object
Returns the value of attribute transport_backoff_multiplier.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def transport_backoff_multiplier @transport_backoff_multiplier end |
#transport_initial_backoff ⇒ Object
Returns the value of attribute transport_initial_backoff.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def transport_initial_backoff @transport_initial_backoff end |
#transport_jitter ⇒ Object
Returns the value of attribute transport_jitter.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def transport_jitter @transport_jitter end |
#transport_max_backoff ⇒ Object
Returns the value of attribute transport_max_backoff.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def transport_max_backoff @transport_max_backoff end |
#transport_max_retries ⇒ Object
Returns the value of attribute transport_max_retries.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def transport_max_retries @transport_max_retries end |
#transport_ssl_verify ⇒ Object
Returns the value of attribute transport_ssl_verify.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def transport_ssl_verify @transport_ssl_verify end |
#transport_timeout ⇒ Object
Returns the value of attribute transport_timeout.
18 19 20 |
# File 'lib/lapsoss/configuration.rb', line 18 def transport_timeout @transport_timeout end |
#whitelist_fields ⇒ Object
Returns the value of attribute whitelist_fields.
9 10 11 |
# File 'lib/lapsoss/configuration.rb', line 9 def whitelist_fields @whitelist_fields end |
Instance Method Details
#adapter_names ⇒ Object
Get configured adapter names
168 169 170 |
# File 'lib/lapsoss/configuration.rb', line 168 def adapter_names @adapter_configs.keys end |
#adapters_configured? ⇒ Boolean
Check if any adapters are configured
163 164 165 |
# File 'lib/lapsoss/configuration.rb', line 163 def adapters_configured? !@adapter_configs.empty? end |
#apply! ⇒ Object
Apply configuration by registering all adapters
150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/lapsoss/configuration.rb', line 150 def apply! Registry.instance.clear! @adapter_configs.each do |name, config| Registry.instance.register( name, config[:type], **config[:settings] ) end end |
#async? ⇒ Boolean
207 208 209 |
# File 'lib/lapsoss/configuration.rb', line 207 def async? @async end |
#clear! ⇒ Object
199 200 201 |
# File 'lib/lapsoss/configuration.rb', line 199 def clear! initialize end |
#configure_pipeline {|@pipeline_builder| ... } ⇒ Object
Pipeline configuration
212 213 214 215 216 |
# File 'lib/lapsoss/configuration.rb', line 212 def configure_pipeline @pipeline_builder = PipelineBuilder.new yield(@pipeline_builder) if block_given? @pipeline_builder end |
#configure_sampling(strategy = nil, &block) ⇒ Object
Sampling configuration
228 229 230 231 232 233 234 |
# File 'lib/lapsoss/configuration.rb', line 228 def configure_sampling(strategy = nil, &block) if strategy @sampling_strategy = strategy elsif block_given? @sampling_strategy = block end end |
#create_sampling_strategy ⇒ Object
236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/lapsoss/configuration.rb', line 236 def create_sampling_strategy case @sampling_strategy when Numeric Sampling::UniformSampler.new(@sampling_strategy) when Proc @sampling_strategy when nil Sampling::UniformSampler.new(@sample_rate) else @sampling_strategy end end |
#debug? ⇒ Boolean
203 204 205 |
# File 'lib/lapsoss/configuration.rb', line 203 def debug? @debug end |
#default_extra ⇒ Object
195 196 197 |
# File 'lib/lapsoss/configuration.rb', line 195 def default_extra @default_context[:extra] ||= {} end |
#default_extra=(extra) ⇒ Object
Default extra context setter/getter
191 192 193 |
# File 'lib/lapsoss/configuration.rb', line 191 def default_extra=(extra) @default_context[:extra] = extra end |
#default_tags ⇒ Object
177 178 179 |
# File 'lib/lapsoss/configuration.rb', line 177 def @default_context[:tags] ||= {} end |
#default_tags=(tags) ⇒ Object
Default tags setter/getter
173 174 175 |
# File 'lib/lapsoss/configuration.rb', line 173 def () @default_context[:tags] = end |
#default_user ⇒ Object
186 187 188 |
# File 'lib/lapsoss/configuration.rb', line 186 def default_user @default_context[:user] end |
#default_user=(user) ⇒ Object
Default user setter/getter
182 183 184 |
# File 'lib/lapsoss/configuration.rb', line 182 def default_user=(user) @default_context[:user] = user end |
#pipeline ⇒ Object
218 219 220 |
# File 'lib/lapsoss/configuration.rb', line 218 def pipeline @pipeline || @pipeline_builder&.pipeline end |
#pipeline=(value) ⇒ Object
222 223 224 225 |
# File 'lib/lapsoss/configuration.rb', line 222 def pipeline=(value) validate_callable!(value, "pipeline") if value @pipeline = value end |
#register_adapter(name, type, **settings) ⇒ Object
Register a named adapter configuration
78 79 80 81 82 83 |
# File 'lib/lapsoss/configuration.rb', line 78 def register_adapter(name, type, **settings) @adapter_configs[name.to_sym] = { type: type&.to_sym, settings: settings } end |
#use_appsignal(name: :appsignal, **settings) ⇒ Object
Convenience method for AppSignal
96 97 98 |
# File 'lib/lapsoss/configuration.rb', line 96 def use_appsignal(name: :appsignal, **settings) register_adapter(name, :appsignal, **settings) end |
#use_bugsnag(name: :bugsnag, **settings) ⇒ Object
Backwards compatibility for Bugsnag
106 107 108 |
# File 'lib/lapsoss/configuration.rb', line 106 def use_bugsnag(name: :bugsnag, **settings) register_adapter(name, :bugsnag, **settings) end |
#use_insight_hub(name: :insight_hub, **settings) ⇒ Object
Convenience method for Insight Hub
101 102 103 |
# File 'lib/lapsoss/configuration.rb', line 101 def use_insight_hub(name: :insight_hub, **settings) register_adapter(name, :insight_hub, **settings) end |
#use_jaeger(name: :jaeger, **settings) ⇒ Object
Convenience method for Jaeger (OTLP-compatible)
138 139 140 141 |
# File 'lib/lapsoss/configuration.rb', line 138 def use_jaeger(name: :jaeger, **settings) settings[:endpoint] ||= "http://localhost:4318" register_adapter(name, :otlp, **settings) end |
#use_logger(name: :logger, **settings) ⇒ Object
Convenience method for Logger
116 117 118 |
# File 'lib/lapsoss/configuration.rb', line 116 def use_logger(name: :logger, **settings) register_adapter(name, :logger, **settings) end |
#use_openobserve(name: :openobserve, **settings) ⇒ Object
Convenience method for OpenObserve
121 122 123 |
# File 'lib/lapsoss/configuration.rb', line 121 def use_openobserve(name: :openobserve, **settings) register_adapter(name, :openobserve, **settings) end |
#use_otlp(name: :otlp, **settings) ⇒ Object
Convenience method for OTLP (OpenTelemetry Protocol) Works with SigNoz, Jaeger, Tempo, Honeycomb, etc.
127 128 129 |
# File 'lib/lapsoss/configuration.rb', line 127 def use_otlp(name: :otlp, **settings) register_adapter(name, :otlp, **settings) end |
#use_rollbar(name: :rollbar, **settings) ⇒ Object
Convenience method for Rollbar
111 112 113 |
# File 'lib/lapsoss/configuration.rb', line 111 def (name: :rollbar, **settings) register_adapter(name, :rollbar, **settings) end |
#use_sentry(name: :sentry, **settings) ⇒ Object
Convenience method for Sentry
86 87 88 |
# File 'lib/lapsoss/configuration.rb', line 86 def use_sentry(name: :sentry, **settings) register_adapter(name, :sentry, **settings) end |
#use_signoz(name: :signoz, **settings) ⇒ Object
Convenience method for SigNoz (OTLP-compatible)
132 133 134 135 |
# File 'lib/lapsoss/configuration.rb', line 132 def use_signoz(name: :signoz, **settings) settings[:endpoint] ||= "http://localhost:4318" register_adapter(name, :otlp, **settings) end |
#use_telebugs(name: :telebugs, **settings) ⇒ Object
Convenience method for Telebugs (Sentry-compatible)
91 92 93 |
# File 'lib/lapsoss/configuration.rb', line 91 def use_telebugs(name: :telebugs, **settings) register_adapter(name, :telebugs, **settings) end |
#use_tempo(name: :tempo, **settings) ⇒ Object
Convenience method for Grafana Tempo (OTLP-compatible)
144 145 146 147 |
# File 'lib/lapsoss/configuration.rb', line 144 def use_tempo(name: :tempo, **settings) settings[:endpoint] ||= "http://localhost:4318" register_adapter(name, :otlp, **settings) end |
#validate! ⇒ Object
Configuration validation - just log warnings, don’t fail
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/lapsoss/configuration.rb', line 309 def validate! # Check sample rate is between 0 and 1 if @sample_rate && (@sample_rate < 0 || @sample_rate > 1) logger.warn "sample_rate should be between 0 and 1, got #{@sample_rate}" end # Check callables validate_callable!(@before_send, "before_send") validate_callable!(@error_handler, "error_handler") validate_callable!(@fingerprint_callback, "fingerprint_callback") # Log if environment looks unusual validate_environment!(@environment, "environment") if @environment # Just log if transport settings look unusual if @transport_timeout && @transport_timeout <= 0 logger.warn "transport_timeout should be positive, got #{@transport_timeout}" end if @transport_max_retries && @transport_max_retries < 0 logger.warn "transport_max_retries should be non-negative, got #{@transport_max_retries}" end if @transport_initial_backoff && @transport_max_backoff && @transport_initial_backoff > @transport_max_backoff logger.warn "transport_initial_backoff (#{@transport_initial_backoff}) should be less than transport_max_backoff (#{@transport_max_backoff})" end # Validate adapter configurations exist @adapter_configs.each do |name, config| if config[:type].blank? logger.warn "Adapter '#{name}' has no type specified" end end true end |