sentry-ruby-core 4.8.1 → 4.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0d62d3133d461116b39ce7e822a3cc523c378417eafade8b3a904f76bce5289
4
- data.tar.gz: 4ae280d6e7d88107e7f34f0794d266182d1c801407373023293c38db038aae50
3
+ metadata.gz: '09a04a594b731f8d13770650138f1abd5bce410dad2f4cb4da1a2caa5ef7eba2'
4
+ data.tar.gz: e87cac23635525aa1b53772e262706a10948b52b634fafeedaf241c8b6d90c9a
5
5
  SHA512:
6
- metadata.gz: 8027f22238a8012bb1aca95d528cb479e287a5b6b17269c9789056d6959f33cab558fac3166147b82b2bda7ee6ad87f4d484ad83634d41804bf198ea7fddd7b2
7
- data.tar.gz: ea6681465bf4f538139b0ba6057ea34dec7cb848e77be48ca65c5d7ee5080c492f324dda7903f40d1db275d4bea4f3887048ebf144d7748d02be35314e5fb977
6
+ metadata.gz: db6311ce62c548e835cbc49c7616ac244d853c3206599e1b540035b16da97bf05cd52a81602cf30215f15ee3e675d6857cdba628f87fc631e73d63d9523081d5
7
+ data.tar.gz: ae31de8f2bab17f15f16c8e6fea3fbbc359efc39c5f2ec5afba9fbfccbd4e77c22f051cd2b94278ff9c3ce92289448cccf1af8fc5df5da1fd7f25bb81458ae29
data/.yardopts ADDED
@@ -0,0 +1,2 @@
1
+ --exclude lib/sentry/utils/
2
+ --exclude lib/sentry/core_ext
data/Gemfile CHANGED
@@ -22,3 +22,5 @@ gem "benchmark-ips"
22
22
  gem "benchmark_driver"
23
23
  gem "benchmark-ipsa"
24
24
  gem "benchmark-memory"
25
+
26
+ gem "yard", "~> 0.9.27"
@@ -4,6 +4,7 @@
4
4
 
5
5
  module Sentry
6
6
  # Front end to parsing the backtrace for each notice
7
+ # @api private
7
8
  class Backtrace
8
9
  # Handles backtrace parsing line by line
9
10
  class Line
@@ -17,10 +17,15 @@ module Sentry
17
17
  # Directories to be recognized as part of your app. e.g. if you
18
18
  # have an `engines` dir at the root of your project, you may want
19
19
  # to set this to something like /(app|config|engines|lib)/
20
+ #
21
+ # @return [Regexp, nil]
20
22
  attr_accessor :app_dirs_pattern
21
23
 
22
24
  # Provide an object that responds to `call` to send events asynchronously.
23
25
  # E.g.: lambda { |event| Thread.new { Sentry.send_event(event) } }
26
+ #
27
+ # @deprecated It will be removed in the next major release. Please read https://github.com/getsentry/sentry-ruby/issues/1522 for more information
28
+ # @return [Proc, nil]
24
29
  attr_reader :async
25
30
 
26
31
  # to send events in a non-blocking way, sentry-ruby has its own background worker
@@ -30,74 +35,94 @@ module Sentry
30
35
  #
31
36
  # if you want to send events synchronously, set the value to 0
32
37
  # E.g.: config.background_worker_threads = 0
38
+ # @return [Integer]
33
39
  attr_accessor :background_worker_threads
34
40
 
35
41
  # a proc/lambda that takes an array of stack traces
36
42
  # it'll be used to silence (reduce) backtrace of the exception
37
43
  #
38
- # for example:
39
- #
40
- # ```ruby
41
- # Sentry.configuration.backtrace_cleanup_callback = lambda do |backtrace|
42
- # Rails.backtrace_cleaner.clean(backtrace)
43
- # end
44
- # ```
44
+ # @example
45
+ # config.backtrace_cleanup_callback = lambda do |backtrace|
46
+ # Rails.backtrace_cleaner.clean(backtrace)
47
+ # end
45
48
  #
49
+ # @return [Proc]
46
50
  attr_accessor :backtrace_cleanup_callback
47
51
 
48
52
  # Optional Proc, called before adding the breadcrumb to the current scope
49
- # E.g.: lambda { |breadcrumb, hint| breadcrumb }
50
- # E.g.: lambda { |breadcrumb, hint| nil }
51
- # E.g.: lambda { |breadcrumb, hint|
52
- # breadcrumb.message = 'a'
53
- # breadcrumb
54
- # }
53
+ # @example
54
+ # config.before = lambda do |breadcrumb, hint|
55
+ # breadcrumb.message = 'a'
56
+ # breadcrumb
57
+ # end
58
+ # @return [Proc]
55
59
  attr_reader :before_breadcrumb
56
60
 
57
- # Optional Proc, called before sending an event to the server/
58
- # E.g.: lambda { |event, hint| event }
59
- # E.g.: lambda { |event, hint| nil }
60
- # E.g.: lambda { |event, hint|
61
- # event[:message] = 'a'
62
- # event
63
- # }
61
+ # Optional Proc, called before sending an event to the server
62
+ # @example
63
+ # config.before_send = lambda do |event, hint|
64
+ # # skip ZeroDivisionError exceptions
65
+ # # note: hint[:exception] would be a String if you use async callback
66
+ # if hint[:exception].is_a?(ZeroDivisionError)
67
+ # nil
68
+ # else
69
+ # event
70
+ # end
71
+ # end
72
+ # @return [Proc]
64
73
  attr_reader :before_send
65
74
 
66
75
  # An array of breadcrumbs loggers to be used. Available options are:
67
76
  # - :sentry_logger
77
+ # - :http_logger
78
+ #
79
+ # And if you also use sentry-rails:
68
80
  # - :active_support_logger
81
+ # - :monotonic_active_support_logger
82
+ #
83
+ # @return [Array<Symbol>]
69
84
  attr_reader :breadcrumbs_logger
70
85
 
71
86
  # Whether to capture local variables from the raised exception's frame. Default is false.
87
+ # @return [Boolean]
72
88
  attr_accessor :capture_exception_frame_locals
73
89
 
74
90
  # Max number of breadcrumbs a breadcrumb buffer can hold
91
+ # @return [Integer]
75
92
  attr_accessor :max_breadcrumbs
76
93
 
77
94
  # Number of lines of code context to capture, or nil for none
95
+ # @return [Integer, nil]
78
96
  attr_accessor :context_lines
79
97
 
80
98
  # RACK_ENV by default.
99
+ # @return [String]
81
100
  attr_reader :environment
82
101
 
83
102
  # Whether the SDK should run in the debugging mode. Default is false.
84
103
  # If set to true, SDK errors will be logged with backtrace
104
+ # @return [Boolean]
85
105
  attr_accessor :debug
86
106
 
87
107
  # the dsn value, whether it's set via `config.dsn=` or `ENV["SENTRY_DSN"]`
108
+ # @return [String]
88
109
  attr_reader :dsn
89
110
 
90
111
  # Whitelist of enabled_environments that will send notifications to Sentry. Array of Strings.
112
+ # @return [Array<String>]
91
113
  attr_accessor :enabled_environments
92
114
 
93
115
  # Logger 'progname's to exclude from breadcrumbs
116
+ # @return [Array<String>]
94
117
  attr_accessor :exclude_loggers
95
118
 
96
119
  # Array of exception classes that should never be sent. See IGNORE_DEFAULT.
97
120
  # You should probably append to this rather than overwrite it.
121
+ # @return [Array<String>]
98
122
  attr_accessor :excluded_exceptions
99
123
 
100
124
  # Boolean to check nested exceptions when deciding if to exclude. Defaults to true
125
+ # @return [Boolean]
101
126
  attr_accessor :inspect_exception_causes_for_exclusion
102
127
  alias inspect_exception_causes_for_exclusion? inspect_exception_causes_for_exclusion
103
128
 
@@ -108,65 +133,80 @@ module Sentry
108
133
 
109
134
  # Logger used by Sentry. In Rails, this is the Rails logger, otherwise
110
135
  # Sentry provides its own Sentry::Logger.
136
+ # @return [Logger]
111
137
  attr_accessor :logger
112
138
 
113
139
  # Project directory root for in_app detection. Could be Rails root, etc.
114
140
  # Set automatically for Rails.
141
+ # @return [String]
115
142
  attr_accessor :project_root
116
143
 
117
144
  # Insert sentry-trace to outgoing requests' headers
145
+ # @return [Boolean]
118
146
  attr_accessor :propagate_traces
119
147
 
120
148
  # Array of rack env parameters to be included in the event sent to sentry.
149
+ # @return [Array<String>]
121
150
  attr_accessor :rack_env_whitelist
122
151
 
123
152
  # Release tag to be passed with every event sent to Sentry.
124
153
  # We automatically try to set this to a git SHA or Capistrano release.
154
+ # @return [String]
125
155
  attr_accessor :release
126
156
 
127
157
  # The sampling factor to apply to events. A value of 0.0 will not send
128
158
  # any events, and a value of 1.0 will send 100% of events.
159
+ # @return [Float]
129
160
  attr_accessor :sample_rate
130
161
 
131
162
  # Include module versions in reports - boolean.
163
+ # @return [Boolean]
132
164
  attr_accessor :send_modules
133
165
 
134
166
  # When send_default_pii's value is false (default), sensitive information like
135
167
  # - user ip
136
168
  # - user cookie
137
169
  # - request body
170
+ # - query string
138
171
  # will not be sent to Sentry.
172
+ # @return [Boolean]
139
173
  attr_accessor :send_default_pii
140
174
 
141
175
  # Allow to skip Sentry emails within rake tasks
176
+ # @return [Boolean]
142
177
  attr_accessor :skip_rake_integration
143
178
 
144
179
  # IP ranges for trusted proxies that will be skipped when calculating IP address.
145
180
  attr_accessor :trusted_proxies
146
181
 
182
+ # @return [String]
147
183
  attr_accessor :server_name
148
184
 
149
185
  # Return a Transport::Configuration object for transport-related configurations.
186
+ # @return [Transport]
150
187
  attr_reader :transport
151
188
 
152
189
  # Take a float between 0.0 and 1.0 as the sample rate for tracing events (transactions).
190
+ # @return [Float]
153
191
  attr_accessor :traces_sample_rate
154
192
 
155
193
  # Take a Proc that controls the sample rate for every tracing event, e.g.
156
- # ```
157
- # lambda do |tracing_context|
158
- # # tracing_context[:transaction_context] contains the information about the transaction
159
- # # tracing_context[:parent_sampled] contains the transaction's parent's sample decision
160
- # true # return value can be a boolean or a float between 0.0 and 1.0
161
- # end
162
- # ```
194
+ # @example
195
+ # config.traces_sampler = lambda do |tracing_context|
196
+ # # tracing_context[:transaction_context] contains the information about the transaction
197
+ # # tracing_context[:parent_sampled] contains the transaction's parent's sample decision
198
+ # true # return value can be a boolean or a float between 0.0 and 1.0
199
+ # end
200
+ # @return [Proc]
163
201
  attr_accessor :traces_sampler
164
202
 
165
203
  # Send diagnostic client reports about dropped events, true by default
166
204
  # tries to attach to an existing envelope max once every 30s
205
+ # @return [Boolean]
167
206
  attr_accessor :send_client_reports
168
207
 
169
208
  # these are not config options
209
+ # @!visibility private
170
210
  attr_reader :errors, :gem_specs
171
211
 
172
212
  # Most of these errors generate 4XX responses. In general, Sentry clients
@@ -287,11 +327,6 @@ module Sentry
287
327
  Random.rand < sample_rate
288
328
  end
289
329
 
290
- def error_messages
291
- @errors = [@errors[0]] + @errors[1..-1].map(&:downcase) # fix case of all but first
292
- @errors.join(", ")
293
- end
294
-
295
330
  def exception_class_allowed?(exc)
296
331
  if exc.is_a?(Sentry::Error)
297
332
  # Try to prevent error reporting loops
@@ -313,6 +348,17 @@ module Sentry
313
348
  !!((@traces_sample_rate && @traces_sample_rate >= 0.0 && @traces_sample_rate <= 1.0) || @traces_sampler) && sending_allowed?
314
349
  end
315
350
 
351
+ # @return [String, nil]
352
+ def csp_report_uri
353
+ if dsn && dsn.valid?
354
+ uri = dsn.csp_report_uri
355
+ uri += "&sentry_release=#{CGI.escape(release)}" if release && !release.empty?
356
+ uri += "&sentry_environment=#{CGI.escape(environment)}" if environment && !environment.empty?
357
+ uri
358
+ end
359
+ end
360
+
361
+ # @api private
316
362
  def stacktrace_builder
317
363
  @stacktrace_builder ||= StacktraceBuilder.new(
318
364
  project_root: @project_root.to_s,
@@ -323,6 +369,7 @@ module Sentry
323
369
  )
324
370
  end
325
371
 
372
+ # @api private
326
373
  def detect_release
327
374
  return unless sending_allowed?
328
375
 
@@ -335,13 +382,10 @@ module Sentry
335
382
  log_error("Error detecting release", e, debug: debug)
336
383
  end
337
384
 
338
- def csp_report_uri
339
- if dsn && dsn.valid?
340
- uri = dsn.csp_report_uri
341
- uri += "&sentry_release=#{CGI.escape(release)}" if release && !release.empty?
342
- uri += "&sentry_environment=#{CGI.escape(environment)}" if environment && !environment.empty?
343
- uri
344
- end
385
+ # @api private
386
+ def error_messages
387
+ @errors = [@errors[0]] + @errors[1..-1].map(&:downcase) # fix case of all but first
388
+ @errors.join(", ")
345
389
  end
346
390
 
347
391
  private
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentry
4
+ # @api private
4
5
  class Envelope
5
6
  def initialize(headers)
6
7
  @headers = headers
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentry
4
+ # @api private
4
5
  class LineCache
5
6
  def initialize
6
7
  @cache = {}
@@ -3,6 +3,7 @@
3
3
  require "net/http"
4
4
 
5
5
  module Sentry
6
+ # @api private
6
7
  module Net
7
8
  module HTTP
8
9
  OP_NAME = "net.http"
data/lib/sentry/rake.rb CHANGED
@@ -6,6 +6,7 @@ require "rake/task"
6
6
  module Sentry
7
7
  module Rake
8
8
  module Application
9
+ # @api private
9
10
  def display_error_message(ex)
10
11
  Sentry.capture_exception(ex) do |scope|
11
12
  task_name = top_level_tasks.join(' ')
@@ -18,6 +19,7 @@ module Sentry
18
19
  end
19
20
 
20
21
  module Task
22
+ # @api private
21
23
  def execute(args=nil)
22
24
  return super unless Sentry.initialized? && Sentry.get_current_hub
23
25
 
@@ -27,5 +29,13 @@ module Sentry
27
29
  end
28
30
  end
29
31
 
30
- Rake::Application.prepend(Sentry::Rake::Application)
31
- Rake::Task.prepend(Sentry::Rake::Task)
32
+ # @api private
33
+ module Rake
34
+ class Application
35
+ prepend(Sentry::Rake::Application)
36
+ end
37
+
38
+ class Task
39
+ prepend(Sentry::Rake::Task)
40
+ end
41
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentry
4
+ # @api private
4
5
  class ReleaseDetector
5
6
  class << self
6
7
  def detect_release(project_root:, running_on_heroku:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentry
4
- VERSION = "4.8.1"
4
+ VERSION = "4.8.2"
5
5
  end
data/lib/sentry-ruby.rb CHANGED
@@ -39,6 +39,7 @@ module Sentry
39
39
  THREAD_LOCAL = :sentry_hub
40
40
 
41
41
  class << self
42
+ # @!visibility private
42
43
  def exception_locals_tp
43
44
  @exception_locals_tp ||= TracePoint.new(:raise) do |tp|
44
45
  exception = tp.raised_exception
@@ -55,46 +56,60 @@ module Sentry
55
56
  end
56
57
  end
57
58
 
59
+ # @!attribute [rw] background_worker
60
+ # @return [BackgroundWorker]
58
61
  attr_accessor :background_worker
59
62
 
60
63
  ##### Patch Registration #####
61
- #
64
+
65
+ # @!visibility private
62
66
  def register_patch(&block)
63
67
  registered_patches << block
64
68
  end
65
69
 
70
+ # @!visibility private
66
71
  def apply_patches(config)
67
72
  registered_patches.each do |patch|
68
73
  patch.call(config)
69
74
  end
70
75
  end
71
76
 
77
+ # @!visibility private
72
78
  def registered_patches
73
79
  @registered_patches ||= []
74
80
  end
75
81
 
76
82
  ##### Integrations #####
77
- #
83
+
78
84
  # Returns a hash that contains all the integrations that have been registered to the main SDK.
85
+ #
86
+ # @return [Hash{String=>Hash}]
79
87
  def integrations
80
88
  @integrations ||= {}
81
89
  end
82
90
 
83
91
  # Registers the SDK integration with its name and version.
92
+ #
93
+ # @param name [String] name of the integration
94
+ # @param version [String] version of the integration
84
95
  def register_integration(name, version)
85
96
  meta = { name: "sentry.ruby.#{name}", version: version }.freeze
86
97
  integrations[name.to_s] = meta
87
98
  end
88
99
 
89
100
  ##### Method Delegation #####
90
- #
101
+
91
102
  extend Forwardable
92
103
 
93
104
  def_delegators :get_current_client, :configuration, :send_event
94
105
  def_delegators :get_current_scope, :set_tags, :set_extras, :set_user, :set_context
95
106
 
96
107
  ##### Main APIs #####
108
+
109
+ # Initializes the SDK with given configuration.
97
110
  #
111
+ # @yieldparam config [Configuration]
112
+ # @return [void]
98
113
  def init(&block)
99
114
  config = Configuration.new
100
115
  yield(config) if block_given?
@@ -116,24 +131,36 @@ module Sentry
116
131
  end
117
132
  end
118
133
 
134
+ # Returns true if the SDK is initialized.
135
+ #
136
+ # @return [Boolean]
137
+ def initialized?
138
+ !!@main_hub
139
+ end
140
+
119
141
  # Returns an uri for security policy reporting that's generated from the given DSN
120
142
  # (To learn more about security policy reporting: https://docs.sentry.io/product/security-policy-reporting/)
121
143
  #
122
144
  # It returns nil if
145
+ # - The SDK is not initialized yet.
146
+ # - The DSN is not provided or is invalid.
123
147
  #
124
- # 1. The SDK is not initialized yet.
125
- # 2. The DSN is not provided or is invalid.
148
+ # @return [String, nil]
126
149
  def csp_report_uri
127
150
  return unless initialized?
128
151
  configuration.csp_report_uri
129
152
  end
130
153
 
131
154
  # Returns the main thread's active hub.
155
+ #
156
+ # @return [Hub]
132
157
  def get_main_hub
133
158
  @main_hub
134
159
  end
135
160
 
136
161
  # Takes an instance of Sentry::Breadcrumb and stores it to the current active scope.
162
+ #
163
+ # @return [Breadcrumb, nil]
137
164
  def add_breadcrumb(breadcrumb, **options)
138
165
  get_current_hub&.add_breadcrumb(breadcrumb, **options)
139
166
  end
@@ -141,6 +168,8 @@ module Sentry
141
168
  # Returns the current active hub.
142
169
  # If the current thread doesn't have an active hub, it will clone the main thread's active hub,
143
170
  # stores it in the current thread, and then returns it.
171
+ #
172
+ # @return [Hub]
144
173
  def get_current_hub
145
174
  # we need to assign a hub to the current thread if it doesn't have one yet
146
175
  #
@@ -151,85 +180,105 @@ module Sentry
151
180
  end
152
181
 
153
182
  # Returns the current active client.
183
+ # @return [Client, nil]
154
184
  def get_current_client
155
185
  get_current_hub&.current_client
156
186
  end
157
187
 
158
188
  # Returns the current active scope.
189
+ #
190
+ # @return [Scope, nil]
159
191
  def get_current_scope
160
192
  get_current_hub&.current_scope
161
193
  end
162
194
 
163
195
  # Clones the main thread's active hub and stores it to the current thread.
196
+ #
197
+ # @return [void]
164
198
  def clone_hub_to_current_thread
165
199
  Thread.current.thread_variable_set(THREAD_LOCAL, get_main_hub.clone)
166
200
  end
167
201
 
168
202
  # Takes a block and yields the current active scope.
169
203
  #
170
- # ```ruby
171
- # Sentry.configure_scope do |scope|
172
- # scope.set_tags(foo: "bar")
173
- # end
204
+ # @example
205
+ # Sentry.configure_scope do |scope|
206
+ # scope.set_tags(foo: "bar")
207
+ # end
174
208
  #
175
- # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
176
- # ```
209
+ # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
177
210
  #
211
+ # @yieldparam scope [Scope]
212
+ # @return [void]
178
213
  def configure_scope(&block)
179
214
  get_current_hub&.configure_scope(&block)
180
215
  end
181
216
 
182
217
  # Takes a block and yields a temporary scope.
183
218
  # The temporary scope will inherit all the attributes from the current active scope and replace it to be the active
184
- # scope inside the block. For example:
219
+ # scope inside the block.
185
220
  #
186
- # ```ruby
187
- # Sentry.configure_scope do |scope|
188
- # scope.set_tags(foo: "bar")
189
- # end
221
+ # @example
222
+ # Sentry.configure_scope do |scope|
223
+ # scope.set_tags(foo: "bar")
224
+ # end
190
225
  #
191
- # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
226
+ # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
192
227
  #
193
- # Sentry.with_scope do |temp_scope|
194
- # temp_scope.set_tags(foo: "baz")
195
- # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" }
196
- # end
228
+ # Sentry.with_scope do |temp_scope|
229
+ # temp_scope.set_tags(foo: "baz")
230
+ # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" }
231
+ # end
197
232
  #
198
- # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" }
199
- # ```
233
+ # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" }
200
234
  #
235
+ # @yieldparam scope [Scope]
236
+ # @return [void]
201
237
  def with_scope(&block)
202
238
  get_current_hub&.with_scope(&block)
203
239
  end
204
240
 
205
241
  # Takes an exception and reports it to Sentry via the currently active hub.
242
+ #
243
+ # @yieldparam scope [Scope]
244
+ # @return [Event, nil]
206
245
  def capture_exception(exception, **options, &block)
207
246
  get_current_hub&.capture_exception(exception, **options, &block)
208
247
  end
209
248
 
210
249
  # Takes a message string and reports it to Sentry via the currently active hub.
250
+ #
251
+ # @yieldparam scope [Scope]
252
+ # @return [Event, nil]
211
253
  def capture_message(message, **options, &block)
212
254
  get_current_hub&.capture_message(message, **options, &block)
213
255
  end
214
256
 
215
257
  # Takes an instance of Sentry::Event and dispatches it to the currently active hub.
258
+ #
259
+ # @return [Event, nil]
216
260
  def capture_event(event)
217
261
  get_current_hub&.capture_event(event)
218
262
  end
219
263
 
220
264
  # Takes or initializes a new Sentry::Transaction and makes a sampling decision for it.
265
+ #
266
+ # @return [Transaction, nil]
221
267
  def start_transaction(**options)
222
268
  get_current_hub&.start_transaction(**options)
223
269
  end
224
270
 
225
271
  # Returns the id of the lastly reported Sentry::Event.
272
+ #
273
+ # @return [String, nil]
226
274
  def last_event_id
227
275
  get_current_hub&.last_event_id
228
276
  end
229
277
 
230
278
 
231
279
  ##### Helpers #####
232
- #
280
+
281
+ # @!visibility private
233
282
  def sys_command(command)
234
283
  result = `#{command} 2>&1` rescue nil
235
284
  return if result.nil? || result.empty? || ($CHILD_STATUS && $CHILD_STATUS.exitstatus != 0)
@@ -237,18 +286,17 @@ module Sentry
237
286
  result.strip
238
287
  end
239
288
 
240
- def initialized?
241
- !!@main_hub
242
- end
243
-
289
+ # @!visibility private
244
290
  def logger
245
291
  configuration.logger
246
292
  end
247
293
 
294
+ # @!visibility private
248
295
  def sdk_meta
249
296
  META
250
297
  end
251
298
 
299
+ # @!visibility private
252
300
  def utc_now
253
301
  Time.now.utc
254
302
  end
data/sentry-ruby.gemspec CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
19
19
 
20
20
  spec.add_dependency "sentry-ruby-core", Sentry::VERSION
21
- spec.add_dependency "faraday", ">= 1.0"
21
+ spec.add_dependency "faraday", "~> 1.0"
22
22
  spec.add_dependency "concurrent-ruby", '~> 1.0', '>= 1.0.2'
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.1
4
+ version: 4.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-22 00:00:00.000000000 Z
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -48,6 +48,7 @@ extra_rdoc_files:
48
48
  files:
49
49
  - ".gitignore"
50
50
  - ".rspec"
51
+ - ".yardopts"
51
52
  - CHANGELOG.md
52
53
  - CODE_OF_CONDUCT.md
53
54
  - Gemfile