sentry-rails 5.16.1 → 5.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/app/jobs/sentry/send_event_job.rb +0 -1
- data/lib/sentry/rails/configuration.rb +3 -3
- data/lib/sentry/rails/error_subscriber.rb +7 -1
- data/lib/sentry/rails/tracing/abstract_subscriber.rb +0 -1
- data/lib/sentry/rails/tracing/active_record_subscriber.rb +6 -5
- data/lib/sentry/rails/tracing/active_storage_subscriber.rb +2 -2
- data/lib/sentry/rails/version.rb +1 -1
- data/sentry-rails.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27a2b73057d5fe8908b1a606879561617a0a0271bf618eb8f7ef23747b4bb4fc
|
4
|
+
data.tar.gz: f345d1d11c3b4f93c19766f58ce3c225599a739614084ae98ca8227ddee1f203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b873d29072399adec9898a5318d494c6d6bf4ab253e5b9f6b6a0233c954e5bdad9b74929e8045f4db35b4ba1a7f0de9b08a3b8d2159da33c3cf55ba92b1ae83
|
7
|
+
data.tar.gz: a848c8424a8aa320f21f06ae3f0353830b3e6ea5d850f379f7642378a28fdd3307195ca48dc4964b9abacf3c84ac5edfc2fda9dc5da773791da9d3e5ccf0f85f
|
data/Rakefile
CHANGED
@@ -104,7 +104,7 @@ module Sentry
|
|
104
104
|
"service_url.active_storage" => %i[service key url],
|
105
105
|
"service_update_metadata.active_storage" => %i[service key],
|
106
106
|
"preview.active_storage" => %i[key],
|
107
|
-
"analyze.active_storage" => %i[analyzer]
|
107
|
+
"analyze.active_storage" => %i[analyzer]
|
108
108
|
}.freeze
|
109
109
|
|
110
110
|
class Configuration
|
@@ -116,8 +116,8 @@ module Sentry
|
|
116
116
|
|
117
117
|
# Rails catches exceptions in the ActionDispatch::ShowExceptions or
|
118
118
|
# ActionDispatch::DebugExceptions middlewares, depending on the environment.
|
119
|
-
# When `
|
120
|
-
#
|
119
|
+
# When `report_rescued_exceptions` is true (it is by default), Sentry will
|
120
|
+
# report exceptions even when they are rescued by these middlewares.
|
121
121
|
attr_accessor :report_rescued_exceptions
|
122
122
|
|
123
123
|
# Some adapters, like sidekiq, already have their own sentry integration.
|
@@ -19,7 +19,13 @@ module Sentry
|
|
19
19
|
tags.merge!(context.delete(:tags))
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
hint = {}
|
23
|
+
if context[:hint].is_a?(Hash)
|
24
|
+
context = context.dup
|
25
|
+
hint.merge!(context.delete(:hint))
|
26
|
+
end
|
27
|
+
|
28
|
+
Sentry::Rails.capture_exception(error, level: severity, contexts: { "rails.error" => context }, tags: tags, hint: hint)
|
23
29
|
end
|
24
30
|
end
|
25
31
|
end
|
@@ -27,11 +27,12 @@ module Sentry
|
|
27
27
|
|
28
28
|
next unless connection
|
29
29
|
|
30
|
-
db_config =
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
db_config =
|
31
|
+
if connection.pool.respond_to?(:db_config)
|
32
|
+
connection.pool.db_config.configuration_hash
|
33
|
+
elsif connection.pool.respond_to?(:spec)
|
34
|
+
connection.pool.spec.config
|
35
|
+
end
|
35
36
|
|
36
37
|
next unless db_config
|
37
38
|
|
@@ -4,7 +4,7 @@ module Sentry
|
|
4
4
|
module Rails
|
5
5
|
module Tracing
|
6
6
|
class ActiveStorageSubscriber < AbstractSubscriber
|
7
|
-
EVENT_NAMES = %w
|
7
|
+
EVENT_NAMES = %w[
|
8
8
|
service_upload.active_storage
|
9
9
|
service_download.active_storage
|
10
10
|
service_streaming_download.active_storage
|
@@ -17,7 +17,7 @@ module Sentry
|
|
17
17
|
service_update_metadata.active_storage
|
18
18
|
preview.active_storage
|
19
19
|
analyze.active_storage
|
20
|
-
|
20
|
+
].freeze
|
21
21
|
|
22
22
|
def self.subscribe!
|
23
23
|
subscribe_to_event(EVENT_NAMES) do |event_name, duration, payload|
|
data/lib/sentry/rails/version.rb
CHANGED
data/sentry-rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.17.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: 2024-
|
11
|
+
date: 2024-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.
|
33
|
+
version: 5.17.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.
|
40
|
+
version: 5.17.0
|
41
41
|
description: A gem that provides Rails integration for the Sentry error logger
|
42
42
|
email: accounts@sentry.io
|
43
43
|
executables: []
|