sentry-ruby-core 4.6.1 → 4.6.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: efdd71de2f9ada8f2c3bbffd41df8edfed7847c7b93390f2ce64a588094bc3d3
4
- data.tar.gz: bdb0b838f35d1fc87c85eb63caf23e48d8234819935f2c80721cc28ec2f53fc8
3
+ metadata.gz: 4d739cc418695f66cb3ff2d84276138d9ede10a4c56c5bb18f7b5e64d95f591b
4
+ data.tar.gz: bd81bdb989613b8a0a401f63a592723a5760bf3a96ec20698b69c3aca002120f
5
5
  SHA512:
6
- metadata.gz: 232f4e625023091167191a733fc5366017eb2212e94ffe939d2b48a3a42956866df2f6b503f5d8103d7246df955f1a203776cccc6537bd5039059ba4832370e3
7
- data.tar.gz: 0cac44f1407e6fd6a93a8fb789b0acefc0f36c9bc33899b149567c0dee91d677b469e7099752361d9b2227d6d76a40db8e1234901f12aed3c8407e7c30470091
6
+ metadata.gz: b28d8c9ab0c76944dfdaf68298077ebedaffa054a2119b8490c4161090d2eef0981fcb8ee1494d68833539d98635b1baec11613ac7f5c8b8fce0bd7268d8c698
7
+ data.tar.gz: 75bbf542edf0d15e1f55684d90566deab151114b6750ad59b9eb224ad998449817987b4d255125fc3316dc99dfb0670ae39783a28df6e539e4e3b3c7c862d65a
data/lib/sentry/dsn.rb CHANGED
@@ -37,7 +37,6 @@ module Sentry
37
37
  def server
38
38
  server = "#{scheme}://#{host}"
39
39
  server += ":#{port}" unless port == PORT_MAP[scheme]
40
- server += path
41
40
  server
42
41
  end
43
42
 
data/lib/sentry/hub.rb CHANGED
@@ -144,6 +144,17 @@ module Sentry
144
144
  current_scope.add_breadcrumb(breadcrumb)
145
145
  end
146
146
 
147
+ # this doesn't do anything to the already initialized background worker
148
+ # but it temporarily disables dispatching events to it
149
+ def with_background_worker_disabled(&block)
150
+ original_background_worker_threads = configuration.background_worker_threads
151
+ configuration.background_worker_threads = 0
152
+
153
+ block.call
154
+ ensure
155
+ configuration.background_worker_threads = original_background_worker_threads
156
+ end
157
+
147
158
  private
148
159
 
149
160
  def current_layer
data/lib/sentry/rake.rb CHANGED
@@ -3,6 +3,7 @@ require "rake/task"
3
3
 
4
4
  module Rake
5
5
  class Application
6
+
6
7
  alias orig_display_error_messsage display_error_message
7
8
  def display_error_message(ex)
8
9
  Sentry.capture_exception(ex, hint: { background: false }) do |scope|
@@ -14,4 +15,16 @@ module Rake
14
15
  orig_display_error_messsage(ex)
15
16
  end
16
17
  end
18
+
19
+ class Task
20
+ alias orig_execute execute
21
+
22
+ def execute(args=nil)
23
+ return orig_execute unless Sentry.initialized? && Sentry.get_current_hub
24
+
25
+ Sentry.get_current_hub.with_background_worker_disabled do
26
+ orig_execute
27
+ end
28
+ end
29
+ end
17
30
  end
@@ -1,3 +1,3 @@
1
1
  module Sentry
2
- VERSION = "4.6.1"
2
+ VERSION = "4.6.2"
3
3
  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.6.1
4
+ version: 4.6.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-07-08 00:00:00.000000000 Z
11
+ date: 2021-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday