sentry-rails 4.9.0 → 4.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sentry/rails/action_cable.rb +10 -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: d8f64ec5f71ef4544b1f9bf403cf7ca6b2c7a1da261bc60cbdd90ed2e6d62319
|
4
|
+
data.tar.gz: c89c1bdf903cdc922972ecbbb5d7522779ee5bcbc257850149037924ed608636
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3291ca030a819d5dd761f70cee7634a706e61895c98cd1758df8b10ad1716f387555a691811b8df5a74892227bb1d2ee30db5982cc7f4e0686cf567847a5b912
|
7
|
+
data.tar.gz: 106116f3dd129838931f2c155f9fb40ca6c75bb2eede9f11e247e36ae0a6f79f0457e0d9a89e0e0e0133cdb04a3df1e44e2473abb8ab8c227bab15500ca10103
|
@@ -3,7 +3,12 @@ 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
|
+
# ActionCable's ConnectionStub (for testing) doesn't implement the exact same interfaces as Connection::Base.
|
8
|
+
# One thing that's missing is `env`. So calling `connection.env` direclty will fail in test environments when `stub_connection` is used.
|
9
|
+
# See https://github.com/getsentry/sentry-ruby/pull/1684 for more information.
|
10
|
+
env = connection.respond_to?(:env) ? connection.env : {}
|
11
|
+
|
7
12
|
Sentry.with_scope do |scope|
|
8
13
|
scope.set_rack_env(env)
|
9
14
|
scope.set_context("action_cable", extra_context) if extra_context
|
@@ -43,13 +48,13 @@ module Sentry
|
|
43
48
|
private
|
44
49
|
|
45
50
|
def handle_open
|
46
|
-
ErrorHandler.capture(
|
51
|
+
ErrorHandler.capture(self, transaction_name: "#{self.class.name}#connect") do
|
47
52
|
super
|
48
53
|
end
|
49
54
|
end
|
50
55
|
|
51
56
|
def handle_close
|
52
|
-
ErrorHandler.capture(
|
57
|
+
ErrorHandler.capture(self, transaction_name: "#{self.class.name}#disconnect") do
|
53
58
|
super
|
54
59
|
end
|
55
60
|
end
|
@@ -69,7 +74,7 @@ module Sentry
|
|
69
74
|
def sentry_capture(hook, &block)
|
70
75
|
extra_context = { params: params }
|
71
76
|
|
72
|
-
ErrorHandler.capture(connection
|
77
|
+
ErrorHandler.capture(connection, transaction_name: "#{self.class.name}##{hook}", extra_context: extra_context, &block)
|
73
78
|
end
|
74
79
|
end
|
75
80
|
|
@@ -79,7 +84,7 @@ module Sentry
|
|
79
84
|
def dispatch_action(action, data)
|
80
85
|
extra_context = { params: params, data: data }
|
81
86
|
|
82
|
-
ErrorHandler.capture(connection
|
87
|
+
ErrorHandler.capture(connection, transaction_name: "#{self.class.name}##{action}", extra_context: extra_context) do
|
83
88
|
super
|
84
89
|
end
|
85
90
|
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.9.
|
4
|
+
version: 4.9.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-14 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: 4.9.
|
33
|
+
version: 4.9.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: 4.9.
|
40
|
+
version: 4.9.1
|
41
41
|
description: A gem that provides Rails integration for the Sentry error logger
|
42
42
|
email: accounts@sentry.io
|
43
43
|
executables: []
|