sentry-ruby-core 4.4.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile +9 -5
  5. data/LICENSE.txt +1 -1
  6. data/README.md +29 -175
  7. data/bin/console +5 -1
  8. data/lib/sentry/background_worker.rb +33 -3
  9. data/lib/sentry/backtrace.rb +1 -3
  10. data/lib/sentry/breadcrumb/sentry_logger.rb +3 -1
  11. data/lib/sentry/breadcrumb.rb +28 -2
  12. data/lib/sentry/breadcrumb_buffer.rb +16 -0
  13. data/lib/sentry/client.rb +66 -7
  14. data/lib/sentry/configuration.rb +156 -112
  15. data/lib/sentry/core_ext/object/deep_dup.rb +4 -0
  16. data/lib/sentry/core_ext/object/duplicable.rb +2 -0
  17. data/lib/sentry/dsn.rb +6 -1
  18. data/lib/sentry/envelope.rb +49 -0
  19. data/lib/sentry/event.rb +65 -23
  20. data/lib/sentry/exceptions.rb +2 -0
  21. data/lib/sentry/hub.rb +37 -6
  22. data/lib/sentry/integrable.rb +2 -0
  23. data/lib/sentry/interface.rb +3 -10
  24. data/lib/sentry/interfaces/exception.rb +13 -3
  25. data/lib/sentry/interfaces/request.rb +52 -21
  26. data/lib/sentry/interfaces/single_exception.rb +31 -0
  27. data/lib/sentry/interfaces/stacktrace.rb +14 -0
  28. data/lib/sentry/interfaces/stacktrace_builder.rb +39 -10
  29. data/lib/sentry/interfaces/threads.rb +12 -2
  30. data/lib/sentry/linecache.rb +3 -0
  31. data/lib/sentry/net/http.rb +79 -51
  32. data/lib/sentry/rack/capture_exceptions.rb +2 -0
  33. data/lib/sentry/rack.rb +2 -1
  34. data/lib/sentry/rake.rb +33 -9
  35. data/lib/sentry/redis.rb +88 -0
  36. data/lib/sentry/release_detector.rb +39 -0
  37. data/lib/sentry/scope.rb +76 -6
  38. data/lib/sentry/span.rb +84 -8
  39. data/lib/sentry/transaction.rb +50 -13
  40. data/lib/sentry/transaction_event.rb +19 -6
  41. data/lib/sentry/transport/configuration.rb +4 -2
  42. data/lib/sentry/transport/dummy_transport.rb +2 -0
  43. data/lib/sentry/transport/http_transport.rb +55 -42
  44. data/lib/sentry/transport.rb +101 -32
  45. data/lib/sentry/utils/argument_checking_helper.rb +2 -0
  46. data/lib/sentry/utils/custom_inspection.rb +14 -0
  47. data/lib/sentry/utils/exception_cause_chain.rb +10 -10
  48. data/lib/sentry/utils/logging_helper.rb +6 -4
  49. data/lib/sentry/utils/real_ip.rb +9 -1
  50. data/lib/sentry/utils/request_id.rb +2 -0
  51. data/lib/sentry/version.rb +3 -1
  52. data/lib/sentry-ruby.rb +247 -47
  53. data/sentry-ruby-core.gemspec +2 -3
  54. data/sentry-ruby.gemspec +2 -3
  55. metadata +10 -22
  56. data/.craft.yml +0 -29
  57. data/lib/sentry/benchmarks/benchmark_transport.rb +0 -14
  58. data/lib/sentry/rack/deprecations.rb +0 -19
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sentry
2
4
  module ArgumentCheckingHelper
3
5
  private
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentry
4
+ module CustomInspection
5
+ def inspect
6
+ attr_strings = (instance_variables - self.class::SKIP_INSPECTION_ATTRIBUTES).each_with_object([]) do |attr, result|
7
+ value = instance_variable_get(attr)
8
+ result << "#{attr}=#{value.inspect}" if value
9
+ end
10
+
11
+ "#<#{self.class.name} #{attr_strings.join(", ")}>"
12
+ end
13
+ end
14
+ end
@@ -1,19 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sentry
2
4
  module Utils
3
5
  module ExceptionCauseChain
4
6
  def self.exception_to_array(exception)
5
- if exception.respond_to?(:cause) && exception.cause
6
- exceptions = [exception]
7
- while exception.cause
8
- exception = exception.cause
9
- break if exceptions.any? { |e| e.object_id == exception.object_id }
7
+ exceptions = [exception]
8
+
9
+ while exception.cause
10
+ exception = exception.cause
11
+ break if exceptions.any? { |e| e.object_id == exception.object_id }
10
12
 
11
- exceptions << exception
12
- end
13
- exceptions
14
- else
15
- [exception]
13
+ exceptions << exception
16
14
  end
15
+
16
+ exceptions
17
17
  end
18
18
  end
19
19
  end
@@ -1,24 +1,26 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sentry
2
4
  module LoggingHelper
3
5
  def log_error(message, exception, debug: false)
4
6
  message = "#{message}: #{exception.message}"
5
7
  message += "\n#{exception.backtrace.join("\n")}" if debug
6
8
 
7
- logger.error(LOGGER_PROGNAME) do
9
+ @logger.error(LOGGER_PROGNAME) do
8
10
  message
9
11
  end
10
12
  end
11
13
 
12
14
  def log_info(message)
13
- logger.info(LOGGER_PROGNAME) { message }
15
+ @logger.info(LOGGER_PROGNAME) { message }
14
16
  end
15
17
 
16
18
  def log_debug(message)
17
- logger.debug(LOGGER_PROGNAME) { message }
19
+ @logger.debug(LOGGER_PROGNAME) { message }
18
20
  end
19
21
 
20
22
  def log_warn(message)
21
- logger.warn(LOGGER_PROGNAME) { message }
23
+ @logger.warn(LOGGER_PROGNAME) { message }
22
24
  end
23
25
  end
24
26
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ipaddr'
2
4
 
3
5
  # Based on ActionDispatch::RemoteIp. All security-related precautions from that
@@ -29,7 +31,13 @@ module Sentry
29
31
  @client_ip = client_ip
30
32
  @real_ip = real_ip
31
33
  @forwarded_for = forwarded_for
32
- @trusted_proxies = (LOCAL_ADDRESSES + Array(trusted_proxies)).map { |proxy| IPAddr.new(proxy.to_s) }.uniq
34
+ @trusted_proxies = (LOCAL_ADDRESSES + Array(trusted_proxies)).map do |proxy|
35
+ if proxy.is_a?(IPAddr)
36
+ proxy
37
+ else
38
+ IPAddr.new(proxy.to_s)
39
+ end
40
+ end.uniq
33
41
  end
34
42
 
35
43
  def calculate_ip
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sentry
2
4
  module Utils
3
5
  module RequestId
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sentry
2
- VERSION = "4.4.0"
4
+ VERSION = "5.1.1"
3
5
  end
data/lib/sentry-ruby.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "English"
2
4
  require "forwardable"
3
5
  require "time"
@@ -7,7 +9,6 @@ require "sentry/exceptions"
7
9
  require "sentry/core_ext/object/deep_dup"
8
10
  require "sentry/utils/argument_checking_helper"
9
11
  require "sentry/utils/logging_helper"
10
- require "sentry/net/http"
11
12
  require "sentry/configuration"
12
13
  require "sentry/logger"
13
14
  require "sentry/event"
@@ -17,7 +18,6 @@ require "sentry/transaction"
17
18
  require "sentry/hub"
18
19
  require "sentry/background_worker"
19
20
 
20
-
21
21
  [
22
22
  "sentry/rake",
23
23
  "sentry/rack",
@@ -31,63 +31,213 @@ end
31
31
  module Sentry
32
32
  META = { "name" => "sentry.ruby", "version" => Sentry::VERSION }.freeze
33
33
 
34
+ CAPTURED_SIGNATURE = :@__sentry_captured
35
+
34
36
  LOGGER_PROGNAME = "sentry".freeze
35
37
 
38
+ SENTRY_TRACE_HEADER_NAME = "sentry-trace".freeze
39
+
36
40
  THREAD_LOCAL = :sentry_hub
37
41
 
38
- def self.sdk_meta
39
- META
40
- end
42
+ class << self
43
+ # @!visibility private
44
+ def exception_locals_tp
45
+ @exception_locals_tp ||= TracePoint.new(:raise) do |tp|
46
+ exception = tp.raised_exception
41
47
 
42
- def self.utc_now
43
- Time.now.utc
44
- end
48
+ # don't collect locals again if the exception is re-raised
49
+ next if exception.instance_variable_get(:@sentry_locals)
50
+ next unless tp.binding
51
+
52
+ locals = tp.binding.local_variables.each_with_object({}) do |local, result|
53
+ result[local] = tp.binding.local_variable_get(local)
54
+ end
55
+
56
+ exception.instance_variable_set(:@sentry_locals, locals)
57
+ end
58
+ end
59
+
60
+ # @!attribute [rw] background_worker
61
+ # @return [BackgroundWorker]
62
+ attr_accessor :background_worker
63
+
64
+ ##### Patch Registration #####
65
+
66
+ # @!visibility private
67
+ def register_patch(&block)
68
+ registered_patches << block
69
+ end
70
+
71
+ # @!visibility private
72
+ def apply_patches(config)
73
+ registered_patches.each do |patch|
74
+ patch.call(config)
75
+ end
76
+ end
77
+
78
+ # @!visibility private
79
+ def registered_patches
80
+ @registered_patches ||= []
81
+ end
82
+
83
+ ##### Integrations #####
45
84
 
46
- class << self
47
85
  # Returns a hash that contains all the integrations that have been registered to the main SDK.
86
+ #
87
+ # @return [Hash{String=>Hash}]
48
88
  def integrations
49
89
  @integrations ||= {}
50
90
  end
51
91
 
52
92
  # Registers the SDK integration with its name and version.
93
+ #
94
+ # @param name [String] name of the integration
95
+ # @param version [String] version of the integration
53
96
  def register_integration(name, version)
54
97
  meta = { name: "sentry.ruby.#{name}", version: version }.freeze
55
98
  integrations[name.to_s] = meta
56
99
  end
57
- end
58
100
 
59
- class << self
101
+ ##### Method Delegation #####
102
+
60
103
  extend Forwardable
61
104
 
62
- def_delegators :get_current_client, :configuration, :send_event
63
- def_delegators :get_current_scope, :set_tags, :set_extras, :set_user, :set_context
105
+ # @!macro [new] configuration
106
+ # The Configuration object that's used for configuring the client and its transport.
107
+ # @return [Configuration]
108
+ # @!macro [new] send_event
109
+ # Sends the event to Sentry.
110
+ # @param event [Event] the event to be sent.
111
+ # @param hint [Hash] the hint data that'll be passed to `before_send` callback.
112
+ # @return [Event]
64
113
 
65
- attr_accessor :background_worker
114
+ # @!method configuration
115
+ # @!macro configuration
116
+ def configuration
117
+ return unless initialized?
118
+ get_current_client.configuration
119
+ end
120
+
121
+ # @!method send_event
122
+ # @!macro send_event
123
+ def send_event(*args)
124
+ return unless initialized?
125
+ get_current_client.send_event(*args)
126
+ end
127
+
128
+ # @!macro [new] set_extras
129
+ # Updates the scope's extras attribute by merging with the old value.
130
+ # @param extras [Hash]
131
+ # @return [Hash]
132
+ # @!macro [new] set_user
133
+ # Sets the scope's user attribute.
134
+ # @param user [Hash]
135
+ # @return [Hash]
136
+ # @!macro [new] set_context
137
+ # Adds a new key-value pair to current contexts.
138
+ # @param key [String, Symbol]
139
+ # @param value [Object]
140
+ # @return [Hash]
141
+ # @!macro [new] set_tags
142
+ # Updates the scope's tags attribute by merging with the old value.
143
+ # @param tags [Hash]
144
+ # @return [Hash]
145
+
146
+ # @!method set_tags
147
+ # @!macro set_tags
148
+ def set_tags(*args)
149
+ return unless initialized?
150
+ get_current_scope.set_tags(*args)
151
+ end
152
+
153
+ # @!method set_extras
154
+ # @!macro set_extras
155
+ def set_extras(*args)
156
+ return unless initialized?
157
+ get_current_scope.set_extras(*args)
158
+ end
159
+
160
+ # @!method set_user
161
+ # @!macro set_user
162
+ def set_user(*args)
163
+ return unless initialized?
164
+ get_current_scope.set_user(*args)
165
+ end
66
166
 
167
+ # @!method set_context
168
+ # @!macro set_context
169
+ def set_context(*args)
170
+ return unless initialized?
171
+ get_current_scope.set_context(*args)
172
+ end
173
+
174
+ ##### Main APIs #####
175
+
176
+ # Initializes the SDK with given configuration.
177
+ #
178
+ # @yieldparam config [Configuration]
179
+ # @return [void]
67
180
  def init(&block)
68
181
  config = Configuration.new
69
182
  yield(config) if block_given?
183
+ config.detect_release
184
+ apply_patches(config)
70
185
  client = Client.new(config)
71
186
  scope = Scope.new(max_breadcrumbs: config.max_breadcrumbs)
72
187
  hub = Hub.new(client, scope)
73
188
  Thread.current.thread_variable_set(THREAD_LOCAL, hub)
74
189
  @main_hub = hub
75
190
  @background_worker = Sentry::BackgroundWorker.new(config)
191
+
192
+ if config.capture_exception_frame_locals
193
+ exception_locals_tp.enable
194
+ end
195
+
196
+ at_exit do
197
+ @background_worker.shutdown
198
+ end
199
+ end
200
+
201
+ # Returns true if the SDK is initialized.
202
+ #
203
+ # @return [Boolean]
204
+ def initialized?
205
+ !!get_main_hub
206
+ end
207
+
208
+ # Returns an uri for security policy reporting that's generated from the given DSN
209
+ # (To learn more about security policy reporting: https://docs.sentry.io/product/security-policy-reporting/)
210
+ #
211
+ # It returns nil if
212
+ # - The SDK is not initialized yet.
213
+ # - The DSN is not provided or is invalid.
214
+ #
215
+ # @return [String, nil]
216
+ def csp_report_uri
217
+ return unless initialized?
218
+ configuration.csp_report_uri
76
219
  end
77
220
 
78
221
  # Returns the main thread's active hub.
222
+ #
223
+ # @return [Hub]
79
224
  def get_main_hub
80
225
  @main_hub
81
226
  end
82
227
 
83
228
  # Takes an instance of Sentry::Breadcrumb and stores it to the current active scope.
84
- def add_breadcrumb(breadcrumb)
85
- get_current_hub&.add_breadcrumb(breadcrumb)
229
+ #
230
+ # @return [Breadcrumb, nil]
231
+ def add_breadcrumb(breadcrumb, **options)
232
+ return unless initialized?
233
+ get_current_hub.add_breadcrumb(breadcrumb, **options)
86
234
  end
87
235
 
88
236
  # Returns the current active hub.
89
237
  # If the current thread doesn't have an active hub, it will clone the main thread's active hub,
90
238
  # stores it in the current thread, and then returns it.
239
+ #
240
+ # @return [Hub]
91
241
  def get_current_hub
92
242
  # we need to assign a hub to the current thread if it doesn't have one yet
93
243
  #
@@ -98,82 +248,121 @@ module Sentry
98
248
  end
99
249
 
100
250
  # Returns the current active client.
251
+ # @return [Client, nil]
101
252
  def get_current_client
102
- get_current_hub&.current_client
253
+ return unless initialized?
254
+ get_current_hub.current_client
103
255
  end
104
256
 
105
257
  # Returns the current active scope.
258
+ #
259
+ # @return [Scope, nil]
106
260
  def get_current_scope
107
- get_current_hub&.current_scope
261
+ return unless initialized?
262
+ get_current_hub.current_scope
108
263
  end
109
264
 
110
265
  # Clones the main thread's active hub and stores it to the current thread.
266
+ #
267
+ # @return [void]
111
268
  def clone_hub_to_current_thread
112
269
  Thread.current.thread_variable_set(THREAD_LOCAL, get_main_hub.clone)
113
270
  end
114
271
 
115
272
  # Takes a block and yields the current active scope.
116
273
  #
117
- # ```ruby
118
- # Sentry.configure_scope do |scope|
119
- # scope.set_tags(foo: "bar")
120
- # end
274
+ # @example
275
+ # Sentry.configure_scope do |scope|
276
+ # scope.set_tags(foo: "bar")
277
+ # end
121
278
  #
122
- # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
123
- # ```
279
+ # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
124
280
  #
281
+ # @yieldparam scope [Scope]
282
+ # @return [void]
125
283
  def configure_scope(&block)
126
- get_current_hub&.configure_scope(&block)
284
+ return unless initialized?
285
+ get_current_hub.configure_scope(&block)
127
286
  end
128
287
 
129
288
  # Takes a block and yields a temporary scope.
130
289
  # The temporary scope will inherit all the attributes from the current active scope and replace it to be the active
131
- # scope inside the block. For example:
290
+ # scope inside the block.
132
291
  #
133
- # ```ruby
134
- # Sentry.configure_scope do |scope|
135
- # scope.set_tags(foo: "bar")
136
- # end
292
+ # @example
293
+ # Sentry.configure_scope do |scope|
294
+ # scope.set_tags(foo: "bar")
295
+ # end
137
296
  #
138
- # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
297
+ # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
139
298
  #
140
- # Sentry.with_scope do |temp_scope|
141
- # temp_scope.set_tags(foo: "baz")
142
- # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" }
143
- # end
299
+ # Sentry.with_scope do |temp_scope|
300
+ # temp_scope.set_tags(foo: "baz")
301
+ # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" }
302
+ # end
144
303
  #
145
- # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" }
146
- # ```
304
+ # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" }
147
305
  #
306
+ # @yieldparam scope [Scope]
307
+ # @return [void]
148
308
  def with_scope(&block)
149
- get_current_hub&.with_scope(&block)
309
+ return unless initialized?
310
+ get_current_hub.with_scope(&block)
150
311
  end
151
312
 
152
313
  # Takes an exception and reports it to Sentry via the currently active hub.
314
+ #
315
+ # @yieldparam scope [Scope]
316
+ # @return [Event, nil]
153
317
  def capture_exception(exception, **options, &block)
154
- get_current_hub&.capture_exception(exception, **options, &block)
318
+ return unless initialized?
319
+ get_current_hub.capture_exception(exception, **options, &block)
155
320
  end
156
321
 
157
322
  # Takes a message string and reports it to Sentry via the currently active hub.
323
+ #
324
+ # @yieldparam scope [Scope]
325
+ # @return [Event, nil]
158
326
  def capture_message(message, **options, &block)
159
- get_current_hub&.capture_message(message, **options, &block)
327
+ return unless initialized?
328
+ get_current_hub.capture_message(message, **options, &block)
160
329
  end
161
330
 
162
331
  # Takes an instance of Sentry::Event and dispatches it to the currently active hub.
332
+ #
333
+ # @return [Event, nil]
163
334
  def capture_event(event)
164
- get_current_hub&.capture_event(event)
335
+ return unless initialized?
336
+ get_current_hub.capture_event(event)
165
337
  end
166
338
 
167
339
  # Takes or initializes a new Sentry::Transaction and makes a sampling decision for it.
340
+ #
341
+ # @return [Transaction, nil]
168
342
  def start_transaction(**options)
169
- get_current_hub&.start_transaction(**options)
343
+ return unless initialized?
344
+ get_current_hub.start_transaction(**options)
170
345
  end
171
346
 
172
347
  # Returns the id of the lastly reported Sentry::Event.
348
+ #
349
+ # @return [String, nil]
173
350
  def last_event_id
174
- get_current_hub&.last_event_id
351
+ return unless initialized?
352
+ get_current_hub.last_event_id
175
353
  end
176
354
 
355
+ # Checks if the exception object has been captured by the SDK.
356
+ #
357
+ # @return [Boolean]
358
+ def exception_captured?(exc)
359
+ return false unless initialized?
360
+ !!exc.instance_variable_get(CAPTURED_SIGNATURE)
361
+ end
362
+
363
+ ##### Helpers #####
364
+
365
+ # @!visibility private
177
366
  def sys_command(command)
178
367
  result = `#{command} 2>&1` rescue nil
179
368
  return if result.nil? || result.empty? || ($CHILD_STATUS && $CHILD_STATUS.exitstatus != 0)
@@ -181,12 +370,23 @@ module Sentry
181
370
  result.strip
182
371
  end
183
372
 
184
- def initialized?
185
- !!@main_hub
186
- end
187
-
373
+ # @!visibility private
188
374
  def logger
189
375
  configuration.logger
190
376
  end
377
+
378
+ # @!visibility private
379
+ def sdk_meta
380
+ META
381
+ end
382
+
383
+ # @!visibility private
384
+ def utc_now
385
+ Time.now.utc
386
+ end
191
387
  end
192
388
  end
389
+
390
+ # patches
391
+ require "sentry/net/http"
392
+ require "sentry/redis"
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ["Sentry Team"]
7
7
  spec.description = spec.summary = "A gem that provides a client interface for the Sentry error logger"
8
8
  spec.email = "accounts@sentry.io"
9
- spec.license = 'Apache-2.0'
9
+ spec.license = 'MIT'
10
10
  spec.homepage = "https://github.com/getsentry/sentry-ruby"
11
11
 
12
12
  spec.platform = Gem::Platform::RUBY
@@ -16,12 +16,11 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = spec.homepage
19
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/sentry-ruby/CHANGELOG.md"
19
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
20
20
 
21
21
  spec.bindir = "exe"
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency "faraday"
26
25
  spec.add_dependency "concurrent-ruby"
27
26
  end
data/sentry-ruby.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ["Sentry Team"]
7
7
  spec.description = spec.summary = "A gem that provides a client interface for the Sentry error logger"
8
8
  spec.email = "accounts@sentry.io"
9
- spec.license = 'Apache-2.0'
9
+ spec.license = 'MIT'
10
10
  spec.homepage = "https://github.com/getsentry/sentry-ruby"
11
11
 
12
12
  spec.platform = Gem::Platform::RUBY
@@ -15,9 +15,8 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = spec.homepage
18
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/sentry-ruby/CHANGELOG.md"
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"
22
21
  spec.add_dependency "concurrent-ruby", '~> 1.0', '>= 1.0.2'
23
22
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 5.1.1
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-05-03 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: faraday
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: concurrent-ruby
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -46,9 +32,9 @@ extra_rdoc_files:
46
32
  - README.md
47
33
  - LICENSE.txt
48
34
  files:
49
- - ".craft.yml"
50
35
  - ".gitignore"
51
36
  - ".rspec"
37
+ - ".yardopts"
52
38
  - CHANGELOG.md
53
39
  - CODE_OF_CONDUCT.md
54
40
  - Gemfile
@@ -61,7 +47,6 @@ files:
61
47
  - lib/sentry-ruby.rb
62
48
  - lib/sentry/background_worker.rb
63
49
  - lib/sentry/backtrace.rb
64
- - lib/sentry/benchmarks/benchmark_transport.rb
65
50
  - lib/sentry/breadcrumb.rb
66
51
  - lib/sentry/breadcrumb/sentry_logger.rb
67
52
  - lib/sentry/breadcrumb_buffer.rb
@@ -70,6 +55,7 @@ files:
70
55
  - lib/sentry/core_ext/object/deep_dup.rb
71
56
  - lib/sentry/core_ext/object/duplicable.rb
72
57
  - lib/sentry/dsn.rb
58
+ - lib/sentry/envelope.rb
73
59
  - lib/sentry/event.rb
74
60
  - lib/sentry/exceptions.rb
75
61
  - lib/sentry/hub.rb
@@ -86,8 +72,9 @@ files:
86
72
  - lib/sentry/net/http.rb
87
73
  - lib/sentry/rack.rb
88
74
  - lib/sentry/rack/capture_exceptions.rb
89
- - lib/sentry/rack/deprecations.rb
90
75
  - lib/sentry/rake.rb
76
+ - lib/sentry/redis.rb
77
+ - lib/sentry/release_detector.rb
91
78
  - lib/sentry/scope.rb
92
79
  - lib/sentry/span.rb
93
80
  - lib/sentry/transaction.rb
@@ -97,6 +84,7 @@ files:
97
84
  - lib/sentry/transport/dummy_transport.rb
98
85
  - lib/sentry/transport/http_transport.rb
99
86
  - lib/sentry/utils/argument_checking_helper.rb
87
+ - lib/sentry/utils/custom_inspection.rb
100
88
  - lib/sentry/utils/exception_cause_chain.rb
101
89
  - lib/sentry/utils/logging_helper.rb
102
90
  - lib/sentry/utils/real_ip.rb
@@ -106,11 +94,11 @@ files:
106
94
  - sentry-ruby.gemspec
107
95
  homepage: https://github.com/getsentry/sentry-ruby
108
96
  licenses:
109
- - Apache-2.0
97
+ - MIT
110
98
  metadata:
111
99
  homepage_uri: https://github.com/getsentry/sentry-ruby
112
100
  source_code_uri: https://github.com/getsentry/sentry-ruby
113
- changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/CHANGELOG.md
101
+ changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md
114
102
  post_install_message:
115
103
  rdoc_options: []
116
104
  require_paths:
@@ -126,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
114
  - !ruby/object:Gem::Version
127
115
  version: '0'
128
116
  requirements: []
129
- rubygems_version: 3.0.3.1
117
+ rubygems_version: 3.1.6
130
118
  signing_key:
131
119
  specification_version: 4
132
120
  summary: A gem that provides a client interface for the Sentry error logger