sentry-ruby-core 4.6.2 → 4.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sentry/configuration.rb +1 -1
- data/lib/sentry/core_ext/object/deep_dup.rb +2 -0
- data/lib/sentry/core_ext/object/duplicable.rb +1 -0
- data/lib/sentry/event.rb +7 -6
- data/lib/sentry/rake.rb +2 -2
- data/lib/sentry/transaction_event.rb +11 -6
- data/lib/sentry/transport/configuration.rb +2 -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: d11c35de1743f0035364e78a4866425e8976f632363ccc83f63a9f6954e43b29
|
4
|
+
data.tar.gz: 79fe8dad952d06b588407109bc10a8f191ec04739edd5115efd3dbe7a32253d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38d2f4b123c3df2f28117997a769cf54ea1fa4af2eb1e14cc1492b54a23ad0ed53abd8f0ae2492e30abd50df1bccd79d6e8987227ec0dae5411e7130c13821f0
|
7
|
+
data.tar.gz: c1c558a090aa8852b11af61e082ecf2977e948b7cce74c1331e1f019129376492169c901bb6a1b0b89802517b0b89559899e6f414ea93b80d40fee34565a2506
|
data/lib/sentry/configuration.rb
CHANGED
data/lib/sentry/event.rb
CHANGED
@@ -9,7 +9,7 @@ require 'sentry/utils/request_id'
|
|
9
9
|
|
10
10
|
module Sentry
|
11
11
|
class Event
|
12
|
-
|
12
|
+
SERIALIZEABLE_ATTRIBUTES = %i(
|
13
13
|
event_id level timestamp
|
14
14
|
release environment server_name modules
|
15
15
|
message user tags contexts extra
|
@@ -17,9 +17,13 @@ module Sentry
|
|
17
17
|
platform sdk type
|
18
18
|
)
|
19
19
|
|
20
|
+
WRITER_ATTRIBUTES = SERIALIZEABLE_ATTRIBUTES - %i(type timestamp level)
|
21
|
+
|
20
22
|
MAX_MESSAGE_SIZE_IN_BYTES = 1024 * 8
|
21
23
|
|
22
|
-
|
24
|
+
attr_writer(*WRITER_ATTRIBUTES)
|
25
|
+
attr_reader(*SERIALIZEABLE_ATTRIBUTES)
|
26
|
+
|
23
27
|
attr_reader :configuration, :request, :exception, :threads
|
24
28
|
|
25
29
|
def initialize(configuration:, integration_meta: nil, message: nil)
|
@@ -99,9 +103,6 @@ module Sentry
|
|
99
103
|
end
|
100
104
|
end
|
101
105
|
|
102
|
-
def type
|
103
|
-
end
|
104
|
-
|
105
106
|
def to_hash
|
106
107
|
data = serialize_attributes
|
107
108
|
data[:breadcrumbs] = breadcrumbs.to_hash if breadcrumbs
|
@@ -139,7 +140,7 @@ module Sentry
|
|
139
140
|
private
|
140
141
|
|
141
142
|
def serialize_attributes
|
142
|
-
self.class::
|
143
|
+
self.class::SERIALIZEABLE_ATTRIBUTES.each_with_object({}) do |att, memo|
|
143
144
|
if value = public_send(att)
|
144
145
|
memo[att] = value
|
145
146
|
end
|
data/lib/sentry/rake.rb
CHANGED
@@ -20,10 +20,10 @@ module Rake
|
|
20
20
|
alias orig_execute execute
|
21
21
|
|
22
22
|
def execute(args=nil)
|
23
|
-
return orig_execute unless Sentry.initialized? && Sentry.get_current_hub
|
23
|
+
return orig_execute(args) unless Sentry.initialized? && Sentry.get_current_hub
|
24
24
|
|
25
25
|
Sentry.get_current_hub.with_background_worker_disabled do
|
26
|
-
orig_execute
|
26
|
+
orig_execute(args)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -4,22 +4,27 @@ module Sentry
|
|
4
4
|
class TransactionEvent < Event
|
5
5
|
TYPE = "transaction"
|
6
6
|
|
7
|
-
|
7
|
+
SERIALIZEABLE_ATTRIBUTES = %i(
|
8
8
|
event_id level timestamp start_timestamp
|
9
9
|
release environment server_name modules
|
10
10
|
user tags contexts extra
|
11
11
|
transaction platform sdk type
|
12
12
|
)
|
13
13
|
|
14
|
-
|
14
|
+
WRITER_ATTRIBUTES = SERIALIZEABLE_ATTRIBUTES - %i(type timestamp start_timestamp level)
|
15
|
+
|
16
|
+
attr_writer(*WRITER_ATTRIBUTES)
|
17
|
+
attr_reader(*SERIALIZEABLE_ATTRIBUTES)
|
18
|
+
|
15
19
|
attr_accessor :spans
|
16
20
|
|
17
|
-
def
|
18
|
-
|
21
|
+
def initialize(configuration:, integration_meta: nil, message: nil)
|
22
|
+
super
|
23
|
+
@type = TYPE
|
19
24
|
end
|
20
25
|
|
21
|
-
def
|
22
|
-
|
26
|
+
def start_timestamp=(time)
|
27
|
+
@start_timestamp = time.is_a?(Time) ? time.to_f : time
|
23
28
|
end
|
24
29
|
|
25
30
|
def to_hash
|
@@ -2,7 +2,8 @@ module Sentry
|
|
2
2
|
class Transport
|
3
3
|
class Configuration
|
4
4
|
attr_accessor :timeout, :open_timeout, :proxy, :ssl, :ssl_ca_file, :ssl_verification, :http_adapter, :faraday_builder,
|
5
|
-
:
|
5
|
+
:encoding
|
6
|
+
attr_reader :transport_class
|
6
7
|
|
7
8
|
def initialize
|
8
9
|
@ssl_verification = true
|
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.6.
|
4
|
+
version: 4.6.3
|
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-
|
11
|
+
date: 2021-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|