sentry-ruby-core 4.4.0 → 4.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.craft.yml +0 -1
- data/CHANGELOG.md +10 -0
- data/lib/sentry-ruby.rb +20 -1
- data/lib/sentry/net/http.rb +6 -3
- data/lib/sentry/transport.rb +1 -1
- data/lib/sentry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46eeab9b7fdc33dd16bbcdd3c7623dcffdc2e70d1c9af0016c4584a08bf743dd
|
4
|
+
data.tar.gz: 0ebfed842099817048aeb8754f27dfd7e637a66d8b9f64267bd1953cbd1f9645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76284658bda5c4856caf4017046d7f1d6481a11d9287ab0b9ac8363248d1606c7b7a274c9018b56db33062682ceac0f090d614b154048d9e17da4b0a11c98de1
|
7
|
+
data.tar.gz: 3462df382685823d4cd77ac0278644144b0570c04f15db4b2a58d591de8cb25fe3762f222adaf4bb990934c476bfc49b18dfc072021e96bb3f50943caa3dceca
|
data/.craft.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.4.2
|
4
|
+
|
5
|
+
- Fix NoMethodError when SDK's dsn is nil [#1433](https://github.com/getsentry/sentry-ruby/pull/1433)
|
6
|
+
- fix: Update protocol version to 7 [#1434](https://github.com/getsentry/sentry-ruby/pull/1434)
|
7
|
+
- Fixes [#867](https://github.com/getsentry/sentry-ruby/issues/867)
|
8
|
+
|
9
|
+
## 4.4.1
|
10
|
+
|
11
|
+
- Apply patches when initializing the SDK [#1432](https://github.com/getsentry/sentry-ruby/pull/1432)
|
12
|
+
|
3
13
|
## 4.4.0
|
4
14
|
|
5
15
|
### Features
|
data/lib/sentry-ruby.rb
CHANGED
@@ -7,7 +7,6 @@ require "sentry/exceptions"
|
|
7
7
|
require "sentry/core_ext/object/deep_dup"
|
8
8
|
require "sentry/utils/argument_checking_helper"
|
9
9
|
require "sentry/utils/logging_helper"
|
10
|
-
require "sentry/net/http"
|
11
10
|
require "sentry/configuration"
|
12
11
|
require "sentry/logger"
|
13
12
|
require "sentry/event"
|
@@ -64,9 +63,26 @@ module Sentry
|
|
64
63
|
|
65
64
|
attr_accessor :background_worker
|
66
65
|
|
66
|
+
@@registered_patches = []
|
67
|
+
|
68
|
+
def register_patch(&block)
|
69
|
+
registered_patches << block
|
70
|
+
end
|
71
|
+
|
72
|
+
def apply_patches(config)
|
73
|
+
registered_patches.each do |patch|
|
74
|
+
patch.call(config)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def registered_patches
|
79
|
+
@@registered_patches
|
80
|
+
end
|
81
|
+
|
67
82
|
def init(&block)
|
68
83
|
config = Configuration.new
|
69
84
|
yield(config) if block_given?
|
85
|
+
apply_patches(config)
|
70
86
|
client = Client.new(config)
|
71
87
|
scope = Scope.new(max_breadcrumbs: config.max_breadcrumbs)
|
72
88
|
hub = Hub.new(client, scope)
|
@@ -190,3 +206,6 @@ module Sentry
|
|
190
206
|
end
|
191
207
|
end
|
192
208
|
end
|
209
|
+
|
210
|
+
# patches
|
211
|
+
require "sentry/net/http"
|
data/lib/sentry/net/http.rb
CHANGED
@@ -71,8 +71,8 @@ module Sentry
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def from_sentry_sdk?
|
74
|
-
|
75
|
-
|
74
|
+
dsn = Sentry.configuration.dsn
|
75
|
+
dsn && dsn.host == self.address
|
76
76
|
end
|
77
77
|
|
78
78
|
def extract_request_info(req)
|
@@ -84,4 +84,7 @@ module Sentry
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
|
87
|
+
Sentry.register_patch do
|
88
|
+
patch = Sentry::Net::HTTP
|
89
|
+
Net::HTTP.send(:prepend, patch) unless Net::HTTP.ancestors.include?(patch)
|
90
|
+
end
|
data/lib/sentry/transport.rb
CHANGED
data/lib/sentry/version.rb
CHANGED
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.4.
|
4
|
+
version: 4.4.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-05-
|
11
|
+
date: 2021-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|