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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ee07f40f442adc566067614916895a02d753d2a44c518a78d78528c6d967e1e
4
- data.tar.gz: 71004c34b4c2798d8022a3d11dbda9daf19f9f9a39a9d4b9a8bdac0332a0b39f
3
+ metadata.gz: 27a2b73057d5fe8908b1a606879561617a0a0271bf618eb8f7ef23747b4bb4fc
4
+ data.tar.gz: f345d1d11c3b4f93c19766f58ce3c225599a739614084ae98ca8227ddee1f203
5
5
  SHA512:
6
- metadata.gz: 172c3ca6639f55e608db51ef7efb1837791b5bc8836273fed287b58f32a1b88377b50488e70e94134a4c3b9d230731fba03b7a2523cfde975dd6685c7a136d73
7
- data.tar.gz: 3a8010027974f00f4c708e8b0356233c3ccddb7eb525df660b9d9aefbcc535870118dbf727b1658b1271bc5afddc9a93b13a4ce0c496fc22ba9c8db18c84d630
6
+ metadata.gz: 6b873d29072399adec9898a5318d494c6d6bf4ab253e5b9f6b6a0233c954e5bdad9b74929e8045f4db35b4ba1a7f0de9b08a3b8d2159da33c3cf55ba92b1ae83
7
+ data.tar.gz: a848c8424a8aa320f21f06ae3f0353830b3e6ea5d850f379f7642378a28fdd3307195ca48dc4964b9abacf3c84ac5edfc2fda9dc5da773791da9d3e5ccf0f85f
data/Rakefile CHANGED
@@ -11,4 +11,4 @@ task :isolated_specs do
11
11
  end
12
12
  end
13
13
 
14
- task :default => [:spec, :isolated_specs]
14
+ task default: [:spec, :isolated_specs]
@@ -31,4 +31,3 @@ else
31
31
  class SendEventJob; end
32
32
  end
33
33
  end
34
-
@@ -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 `rails_report_rescued_exceptions` is true (it is by default), Sentry
120
- # will report exceptions even when they are rescued by these middlewares.
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
- Sentry::Rails.capture_exception(error, level: severity, contexts: { "rails.error" => context }, tags: tags)
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
@@ -2,7 +2,6 @@ module Sentry
2
2
  module Rails
3
3
  module Tracing
4
4
  class AbstractSubscriber
5
-
6
5
  class << self
7
6
  def subscribe!
8
7
  raise NotImplementedError
@@ -27,11 +27,12 @@ module Sentry
27
27
 
28
28
  next unless connection
29
29
 
30
- db_config = if connection.pool.respond_to?(:db_config)
31
- connection.pool.db_config.configuration_hash
32
- elsif connection.pool.respond_to?(:spec)
33
- connection.pool.spec.config
34
- end
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
- ).freeze
20
+ ].freeze
21
21
 
22
22
  def self.subscribe!
23
23
  subscribe_to_event(EVENT_NAMES) do |event_name, duration, payload|
@@ -1,5 +1,5 @@
1
1
  module Sentry
2
2
  module Rails
3
- VERSION = "5.16.1"
3
+ VERSION = "5.17.0"
4
4
  end
5
5
  end
data/sentry-rails.gemspec CHANGED
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_dependency "railties", ">= 5.0"
26
- spec.add_dependency "sentry-ruby", "~> 5.16.1"
26
+ spec.add_dependency "sentry-ruby", "~> 5.17.0"
27
27
  end
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.16.1
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-01-09 00:00:00.000000000 Z
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.16.1
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.16.1
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: []