sentry-rails 4.9.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/sentry/rails/action_cable.rb +11 -5
- 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: 9487ee74f0da8ec37873850f9b0d9651e4c61dc774e5928c419c553194c363c9
|
4
|
+
data.tar.gz: 28bc3a23ea3e77013f7debf042aabb24e46944d504fcb016dd7427b40a8255dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6012e9e4272e82c60e7f38384c6ee44543661cbdcc3598182cf8b186e6a20fc8391fbb16d0b7688aeb4cc3e80398686416f9eb783364af971bba24acf01be45c
|
7
|
+
data.tar.gz: 0040a4200a194e1fc3769ddf3c29bfc9988b411b1f42a6ddb6a73252720d583c473203348d933e307453f9d782bd2b76b8e13d65959665cc6684967c907c8c6d
|
data/Gemfile
CHANGED
@@ -5,7 +5,7 @@ gemspec
|
|
5
5
|
gem "sentry-ruby", path: "../sentry-ruby"
|
6
6
|
|
7
7
|
rails_version = ENV["RAILS_VERSION"]
|
8
|
-
rails_version = "
|
8
|
+
rails_version = "7.0.0" if rails_version.nil?
|
9
9
|
rails_version = Gem::Version.new(rails_version)
|
10
10
|
|
11
11
|
gem 'activerecord-jdbcmysql-adapter', platform: :jruby
|
@@ -3,7 +3,13 @@ module Sentry
|
|
3
3
|
module ActionCableExtensions
|
4
4
|
class ErrorHandler
|
5
5
|
class << self
|
6
|
-
def capture(
|
6
|
+
def capture(connection, transaction_name:, extra_context: nil, &block)
|
7
|
+
return block.call unless Sentry.initialized?
|
8
|
+
# ActionCable's ConnectionStub (for testing) doesn't implement the exact same interfaces as Connection::Base.
|
9
|
+
# One thing that's missing is `env`. So calling `connection.env` direclty will fail in test environments when `stub_connection` is used.
|
10
|
+
# See https://github.com/getsentry/sentry-ruby/pull/1684 for more information.
|
11
|
+
env = connection.respond_to?(:env) ? connection.env : {}
|
12
|
+
|
7
13
|
Sentry.with_scope do |scope|
|
8
14
|
scope.set_rack_env(env)
|
9
15
|
scope.set_context("action_cable", extra_context) if extra_context
|
@@ -43,13 +49,13 @@ module Sentry
|
|
43
49
|
private
|
44
50
|
|
45
51
|
def handle_open
|
46
|
-
ErrorHandler.capture(
|
52
|
+
ErrorHandler.capture(self, transaction_name: "#{self.class.name}#connect") do
|
47
53
|
super
|
48
54
|
end
|
49
55
|
end
|
50
56
|
|
51
57
|
def handle_close
|
52
|
-
ErrorHandler.capture(
|
58
|
+
ErrorHandler.capture(self, transaction_name: "#{self.class.name}#disconnect") do
|
53
59
|
super
|
54
60
|
end
|
55
61
|
end
|
@@ -69,7 +75,7 @@ module Sentry
|
|
69
75
|
def sentry_capture(hook, &block)
|
70
76
|
extra_context = { params: params }
|
71
77
|
|
72
|
-
ErrorHandler.capture(connection
|
78
|
+
ErrorHandler.capture(connection, transaction_name: "#{self.class.name}##{hook}", extra_context: extra_context, &block)
|
73
79
|
end
|
74
80
|
end
|
75
81
|
|
@@ -79,7 +85,7 @@ module Sentry
|
|
79
85
|
def dispatch_action(action, data)
|
80
86
|
extra_context = { params: params, data: data }
|
81
87
|
|
82
|
-
ErrorHandler.capture(connection
|
88
|
+
ErrorHandler.capture(connection, transaction_name: "#{self.class.name}##{action}", extra_context: extra_context) do
|
83
89
|
super
|
84
90
|
end
|
85
91
|
end
|
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:
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-23 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:
|
33
|
+
version: 5.0.1
|
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:
|
40
|
+
version: 5.0.1
|
41
41
|
description: A gem that provides Rails integration for the Sentry error logger
|
42
42
|
email: accounts@sentry.io
|
43
43
|
executables: []
|