sentry-ruby-core 4.4.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/CHANGELOG.md +2 -0
  4. data/Gemfile +8 -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 +65 -7
  14. data/lib/sentry/configuration.rb +155 -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 +26 -0
  19. data/lib/sentry/event.rb +65 -23
  20. data/lib/sentry/exceptions.rb +2 -0
  21. data/lib/sentry/hub.rb +31 -5
  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 +49 -19
  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 +71 -47
  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/release_detector.rb +39 -0
  36. data/lib/sentry/scope.rb +76 -6
  37. data/lib/sentry/span.rb +84 -8
  38. data/lib/sentry/transaction.rb +48 -10
  39. data/lib/sentry/transaction_event.rb +19 -6
  40. data/lib/sentry/transport/configuration.rb +4 -2
  41. data/lib/sentry/transport/dummy_transport.rb +2 -0
  42. data/lib/sentry/transport/http_transport.rb +57 -38
  43. data/lib/sentry/transport.rb +80 -19
  44. data/lib/sentry/utils/argument_checking_helper.rb +2 -0
  45. data/lib/sentry/utils/custom_inspection.rb +14 -0
  46. data/lib/sentry/utils/exception_cause_chain.rb +10 -10
  47. data/lib/sentry/utils/logging_helper.rb +6 -4
  48. data/lib/sentry/utils/real_ip.rb +9 -1
  49. data/lib/sentry/utils/request_id.rb +2 -0
  50. data/lib/sentry/version.rb +3 -1
  51. data/lib/sentry-ruby.rb +184 -49
  52. data/sentry-ruby-core.gemspec +2 -3
  53. data/sentry-ruby.gemspec +2 -3
  54. metadata +9 -22
  55. data/.craft.yml +0 -28
  56. data/lib/sentry/benchmarks/benchmark_transport.rb +0 -14
  57. data/lib/sentry/rack/deprecations.rb +0 -19
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"
@@ -16,7 +18,6 @@ require "sentry/transaction"
16
18
  require "sentry/hub"
17
19
  require "sentry/background_worker"
18
20
 
19
-
20
21
  [
21
22
  "sentry/rake",
22
23
  "sentry/rack",
@@ -32,56 +33,126 @@ module Sentry
32
33
 
33
34
  LOGGER_PROGNAME = "sentry".freeze
34
35
 
35
- THREAD_LOCAL = :sentry_hub
36
-
37
- def self.sdk_meta
38
- META
39
- end
36
+ SENTRY_TRACE_HEADER_NAME = "sentry-trace".freeze
40
37
 
41
- def self.utc_now
42
- Time.now.utc
43
- end
38
+ THREAD_LOCAL = :sentry_hub
44
39
 
45
40
  class << self
46
- # Returns a hash that contains all the integrations that have been registered to the main SDK.
47
- def integrations
48
- @integrations ||= {}
49
- end
41
+ # @!visibility private
42
+ def exception_locals_tp
43
+ @exception_locals_tp ||= TracePoint.new(:raise) do |tp|
44
+ exception = tp.raised_exception
50
45
 
51
- # Registers the SDK integration with its name and version.
52
- def register_integration(name, version)
53
- meta = { name: "sentry.ruby.#{name}", version: version }.freeze
54
- integrations[name.to_s] = meta
55
- end
56
- end
46
+ # don't collect locals again if the exception is re-raised
47
+ next if exception.instance_variable_get(:@sentry_locals)
48
+ next unless tp.binding
57
49
 
58
- class << self
59
- extend Forwardable
50
+ locals = tp.binding.local_variables.each_with_object({}) do |local, result|
51
+ result[local] = tp.binding.local_variable_get(local)
52
+ end
60
53
 
61
- def_delegators :get_current_client, :configuration, :send_event
62
- def_delegators :get_current_scope, :set_tags, :set_extras, :set_user, :set_context
54
+ exception.instance_variable_set(:@sentry_locals, locals)
55
+ end
56
+ end
63
57
 
58
+ # @!attribute [rw] background_worker
59
+ # @return [BackgroundWorker]
64
60
  attr_accessor :background_worker
65
61
 
66
- @@registered_patches = []
62
+ ##### Patch Registration #####
67
63
 
64
+ # @!visibility private
68
65
  def register_patch(&block)
69
66
  registered_patches << block
70
67
  end
71
68
 
69
+ # @!visibility private
72
70
  def apply_patches(config)
73
71
  registered_patches.each do |patch|
74
72
  patch.call(config)
75
73
  end
76
74
  end
77
75
 
76
+ # @!visibility private
78
77
  def registered_patches
79
- @@registered_patches
78
+ @registered_patches ||= []
79
+ end
80
+
81
+ ##### Integrations #####
82
+
83
+ # Returns a hash that contains all the integrations that have been registered to the main SDK.
84
+ #
85
+ # @return [Hash{String=>Hash}]
86
+ def integrations
87
+ @integrations ||= {}
80
88
  end
81
89
 
90
+ # Registers the SDK integration with its name and version.
91
+ #
92
+ # @param name [String] name of the integration
93
+ # @param version [String] version of the integration
94
+ def register_integration(name, version)
95
+ meta = { name: "sentry.ruby.#{name}", version: version }.freeze
96
+ integrations[name.to_s] = meta
97
+ end
98
+
99
+ ##### Method Delegation #####
100
+
101
+ extend Forwardable
102
+
103
+ # @!macro [new] configuration
104
+ # The Configuration object that's used for configuring the client and its transport.
105
+ # @return [Configuration]
106
+ # @!macro [new] send_event
107
+ # Sends the event to Sentry.
108
+ # @param event [Event] the event to be sent.
109
+ # @param hint [Hash] the hint data that'll be passed to `before_send` callback.
110
+ # @return [Event]
111
+
112
+ # @!method configuration
113
+ # @!macro configuration
114
+ # @!method send_event
115
+ # @!macro send_event
116
+ def_delegators :get_current_client, :configuration, :send_event
117
+
118
+ # @!macro [new] set_extras
119
+ # Updates the scope's extras attribute by merging with the old value.
120
+ # @param extras [Hash]
121
+ # @return [Hash]
122
+ # @!macro [new] set_user
123
+ # Sets the scope's user attribute.
124
+ # @param user [Hash]
125
+ # @return [Hash]
126
+ # @!macro [new] set_context
127
+ # Adds a new key-value pair to current contexts.
128
+ # @param key [String, Symbol]
129
+ # @param value [Object]
130
+ # @return [Hash]
131
+ # @!macro [new] set_tags
132
+ # Updates the scope's tags attribute by merging with the old value.
133
+ # @param tags [Hash]
134
+ # @return [Hash]
135
+
136
+ # @!method set_tags
137
+ # @!macro set_tags
138
+ # @!method set_extras
139
+ # @!macro set_extras
140
+ # @!method set_user
141
+ # @!macro set_user
142
+ # @!method set_context
143
+ # @!macro set_context
144
+ def_delegators :get_current_scope, :set_tags, :set_extras, :set_user, :set_context
145
+
146
+ ##### Main APIs #####
147
+
148
+ # Initializes the SDK with given configuration.
149
+ #
150
+ # @yieldparam config [Configuration]
151
+ # @return [void]
82
152
  def init(&block)
83
153
  config = Configuration.new
84
154
  yield(config) if block_given?
155
+ config.detect_release
85
156
  apply_patches(config)
86
157
  client = Client.new(config)
87
158
  scope = Scope.new(max_breadcrumbs: config.max_breadcrumbs)
@@ -89,21 +160,55 @@ module Sentry
89
160
  Thread.current.thread_variable_set(THREAD_LOCAL, hub)
90
161
  @main_hub = hub
91
162
  @background_worker = Sentry::BackgroundWorker.new(config)
163
+
164
+ if config.capture_exception_frame_locals
165
+ exception_locals_tp.enable
166
+ end
167
+
168
+ at_exit do
169
+ @background_worker.shutdown
170
+ end
171
+ end
172
+
173
+ # Returns true if the SDK is initialized.
174
+ #
175
+ # @return [Boolean]
176
+ def initialized?
177
+ !!get_main_hub
178
+ end
179
+
180
+ # Returns an uri for security policy reporting that's generated from the given DSN
181
+ # (To learn more about security policy reporting: https://docs.sentry.io/product/security-policy-reporting/)
182
+ #
183
+ # It returns nil if
184
+ # - The SDK is not initialized yet.
185
+ # - The DSN is not provided or is invalid.
186
+ #
187
+ # @return [String, nil]
188
+ def csp_report_uri
189
+ return unless initialized?
190
+ configuration.csp_report_uri
92
191
  end
93
192
 
94
193
  # Returns the main thread's active hub.
194
+ #
195
+ # @return [Hub]
95
196
  def get_main_hub
96
197
  @main_hub
97
198
  end
98
199
 
99
200
  # Takes an instance of Sentry::Breadcrumb and stores it to the current active scope.
100
- def add_breadcrumb(breadcrumb)
101
- get_current_hub&.add_breadcrumb(breadcrumb)
201
+ #
202
+ # @return [Breadcrumb, nil]
203
+ def add_breadcrumb(breadcrumb, **options)
204
+ get_current_hub&.add_breadcrumb(breadcrumb, **options)
102
205
  end
103
206
 
104
207
  # Returns the current active hub.
105
208
  # If the current thread doesn't have an active hub, it will clone the main thread's active hub,
106
209
  # stores it in the current thread, and then returns it.
210
+ #
211
+ # @return [Hub]
107
212
  def get_current_hub
108
213
  # we need to assign a hub to the current thread if it doesn't have one yet
109
214
  #
@@ -114,82 +219,105 @@ module Sentry
114
219
  end
115
220
 
116
221
  # Returns the current active client.
222
+ # @return [Client, nil]
117
223
  def get_current_client
118
224
  get_current_hub&.current_client
119
225
  end
120
226
 
121
227
  # Returns the current active scope.
228
+ #
229
+ # @return [Scope, nil]
122
230
  def get_current_scope
123
231
  get_current_hub&.current_scope
124
232
  end
125
233
 
126
234
  # Clones the main thread's active hub and stores it to the current thread.
235
+ #
236
+ # @return [void]
127
237
  def clone_hub_to_current_thread
128
238
  Thread.current.thread_variable_set(THREAD_LOCAL, get_main_hub.clone)
129
239
  end
130
240
 
131
241
  # Takes a block and yields the current active scope.
132
242
  #
133
- # ```ruby
134
- # Sentry.configure_scope do |scope|
135
- # scope.set_tags(foo: "bar")
136
- # end
243
+ # @example
244
+ # Sentry.configure_scope do |scope|
245
+ # scope.set_tags(foo: "bar")
246
+ # end
137
247
  #
138
- # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
139
- # ```
248
+ # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
140
249
  #
250
+ # @yieldparam scope [Scope]
251
+ # @return [void]
141
252
  def configure_scope(&block)
142
253
  get_current_hub&.configure_scope(&block)
143
254
  end
144
255
 
145
256
  # Takes a block and yields a temporary scope.
146
257
  # The temporary scope will inherit all the attributes from the current active scope and replace it to be the active
147
- # scope inside the block. For example:
258
+ # scope inside the block.
148
259
  #
149
- # ```ruby
150
- # Sentry.configure_scope do |scope|
151
- # scope.set_tags(foo: "bar")
152
- # end
260
+ # @example
261
+ # Sentry.configure_scope do |scope|
262
+ # scope.set_tags(foo: "bar")
263
+ # end
153
264
  #
154
- # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
265
+ # Sentry.capture_message("test message") # this event will have tags { foo: "bar" }
155
266
  #
156
- # Sentry.with_scope do |temp_scope|
157
- # temp_scope.set_tags(foo: "baz")
158
- # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" }
159
- # end
267
+ # Sentry.with_scope do |temp_scope|
268
+ # temp_scope.set_tags(foo: "baz")
269
+ # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" }
270
+ # end
160
271
  #
161
- # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" }
162
- # ```
272
+ # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" }
163
273
  #
274
+ # @yieldparam scope [Scope]
275
+ # @return [void]
164
276
  def with_scope(&block)
165
277
  get_current_hub&.with_scope(&block)
166
278
  end
167
279
 
168
280
  # Takes an exception and reports it to Sentry via the currently active hub.
281
+ #
282
+ # @yieldparam scope [Scope]
283
+ # @return [Event, nil]
169
284
  def capture_exception(exception, **options, &block)
170
285
  get_current_hub&.capture_exception(exception, **options, &block)
171
286
  end
172
287
 
173
288
  # Takes a message string and reports it to Sentry via the currently active hub.
289
+ #
290
+ # @yieldparam scope [Scope]
291
+ # @return [Event, nil]
174
292
  def capture_message(message, **options, &block)
175
293
  get_current_hub&.capture_message(message, **options, &block)
176
294
  end
177
295
 
178
296
  # Takes an instance of Sentry::Event and dispatches it to the currently active hub.
297
+ #
298
+ # @return [Event, nil]
179
299
  def capture_event(event)
180
300
  get_current_hub&.capture_event(event)
181
301
  end
182
302
 
183
303
  # Takes or initializes a new Sentry::Transaction and makes a sampling decision for it.
304
+ #
305
+ # @return [Transaction, nil]
184
306
  def start_transaction(**options)
185
307
  get_current_hub&.start_transaction(**options)
186
308
  end
187
309
 
188
310
  # Returns the id of the lastly reported Sentry::Event.
311
+ #
312
+ # @return [String, nil]
189
313
  def last_event_id
190
314
  get_current_hub&.last_event_id
191
315
  end
192
316
 
317
+
318
+ ##### Helpers #####
319
+
320
+ # @!visibility private
193
321
  def sys_command(command)
194
322
  result = `#{command} 2>&1` rescue nil
195
323
  return if result.nil? || result.empty? || ($CHILD_STATUS && $CHILD_STATUS.exitstatus != 0)
@@ -197,13 +325,20 @@ module Sentry
197
325
  result.strip
198
326
  end
199
327
 
200
- def initialized?
201
- !!@main_hub
202
- end
203
-
328
+ # @!visibility private
204
329
  def logger
205
330
  configuration.logger
206
331
  end
332
+
333
+ # @!visibility private
334
+ def sdk_meta
335
+ META
336
+ end
337
+
338
+ # @!visibility private
339
+ def utc_now
340
+ Time.now.utc
341
+ end
207
342
  end
208
343
  end
209
344
 
@@ -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.2
4
+ version: 5.0.0
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-11 00:00:00.000000000 Z
11
+ date: 2022-01-20 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,8 @@ 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/release_detector.rb
91
77
  - lib/sentry/scope.rb
92
78
  - lib/sentry/span.rb
93
79
  - lib/sentry/transaction.rb
@@ -97,6 +83,7 @@ files:
97
83
  - lib/sentry/transport/dummy_transport.rb
98
84
  - lib/sentry/transport/http_transport.rb
99
85
  - lib/sentry/utils/argument_checking_helper.rb
86
+ - lib/sentry/utils/custom_inspection.rb
100
87
  - lib/sentry/utils/exception_cause_chain.rb
101
88
  - lib/sentry/utils/logging_helper.rb
102
89
  - lib/sentry/utils/real_ip.rb
@@ -106,11 +93,11 @@ files:
106
93
  - sentry-ruby.gemspec
107
94
  homepage: https://github.com/getsentry/sentry-ruby
108
95
  licenses:
109
- - Apache-2.0
96
+ - MIT
110
97
  metadata:
111
98
  homepage_uri: https://github.com/getsentry/sentry-ruby
112
99
  source_code_uri: https://github.com/getsentry/sentry-ruby
113
- changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/CHANGELOG.md
100
+ changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md
114
101
  post_install_message:
115
102
  rdoc_options: []
116
103
  require_paths:
@@ -126,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
113
  - !ruby/object:Gem::Version
127
114
  version: '0'
128
115
  requirements: []
129
- rubygems_version: 3.0.3.1
116
+ rubygems_version: 3.1.6
130
117
  signing_key:
131
118
  specification_version: 4
132
119
  summary: A gem that provides a client interface for the Sentry error logger
data/.craft.yml DELETED
@@ -1,28 +0,0 @@
1
- minVersion: '0.13.2'
2
- github:
3
- owner: getsentry
4
- repo: sentry-ruby
5
- changelogPolicy: simple
6
- preReleaseCommand: ruby ../.scripts/bump-version.rb
7
- releaseBranchPrefix: release-sentry-ruby
8
- statusProvider:
9
- name: github
10
- artifactProvider:
11
- name: github
12
- targets:
13
- # we always need to make sure sentry-ruby-core is present when pushing to any target
14
- - name: gem
15
- onlyIfPresent: /^sentry-ruby-core-\d.*\.gem$/
16
- - name: registry
17
- onlyIfPresent: /^sentry-ruby-core-\d.*\.gem$/
18
- type: sdk
19
- config:
20
- canonical: 'gem:sentry-ruby'
21
- - name: registry
22
- onlyIfPresent: /^sentry-ruby-core-\d.*\.gem$/
23
- type: sdk
24
- config:
25
- canonical: 'gem:sentry-ruby-core'
26
- - name: github
27
- onlyIfPresent: /^sentry-ruby-core-\d.*\.gem$/
28
- tagPrefix: sentry-ruby-v
@@ -1,14 +0,0 @@
1
- module Sentry
2
- class BenchmarkTransport < Transport
3
- attr_accessor :events
4
-
5
- def initialize(*)
6
- super
7
- @events = []
8
- end
9
-
10
- def send_event(event)
11
- @events << encode(event.to_hash)
12
- end
13
- end
14
- end
@@ -1,19 +0,0 @@
1
- module Sentry
2
- module Rack
3
- class DeprecatedMiddleware
4
- def initialize(_)
5
- raise Sentry::Error.new <<~MSG
6
-
7
- You're seeing this message because #{self.class} has been replaced by Sentry::Rack::CaptureExceptions.
8
- Removing this middleware from your app and upgrading sentry-rails to 4.1.0+ should solve the issue.
9
- MSG
10
- end
11
- end
12
-
13
- class Tracing < DeprecatedMiddleware
14
- end
15
-
16
- class CaptureException < DeprecatedMiddleware
17
- end
18
- end
19
- end