sentry-rails 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +1 -1
- data/Gemfile +7 -5
- data/bin/test +1 -1
- data/lib/sentry/rails/log_subscribers/action_controller_subscriber.rb +2 -0
- data/lib/sentry/rails/log_subscribers/action_mailer_subscriber.rb +4 -0
- data/lib/sentry/rails/log_subscribers/active_job_subscriber.rb +8 -0
- data/lib/sentry/rails/log_subscribers/active_record_subscriber.rb +22 -0
- data/lib/sentry/rails/version.rb +1 -1
- data/sentry-rails.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0b45b14487fb54357f496eea076b669d064b0f38bbd1960014960ecaf9214df
|
|
4
|
+
data.tar.gz: 1cd430829a299cdd9b357c940e17aa0c3984e6dc30d5f888f50a28b75accff9c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebba56359ebb4c5ac43076f10b069864a61004ba33ddf893ba2a5eba825f8da1f12d18ad685a900a3b253ee8521566a983e83508809b33e02f2d634ff078f181
|
|
7
|
+
data.tar.gz: e01b630f88aa297426743f96635e837d6de0fd888c3dec63b8382affae263c8764f6c92a9972a765d38d5aa8252629c1a568a3edde98e26b3368f530010009f6
|
data/.rspec
CHANGED
data/Gemfile
CHANGED
|
@@ -30,16 +30,18 @@ rails_version = Gem::Version.new(rails_version)
|
|
|
30
30
|
|
|
31
31
|
gem "rails", "~> #{rails_version}"
|
|
32
32
|
|
|
33
|
-
if rails_version >= Gem::Version.new("8.
|
|
34
|
-
gem "rspec-rails"
|
|
33
|
+
if rails_version >= Gem::Version.new("8.1.0")
|
|
34
|
+
gem "rspec-rails", "~> 8.0.0"
|
|
35
|
+
gem "sqlite3", "~> 2.1.1", platform: :ruby
|
|
36
|
+
elsif rails_version >= Gem::Version.new("8.0.0")
|
|
37
|
+
gem "rspec-rails", "~> 8.0.0"
|
|
35
38
|
gem "sqlite3", "~> 2.1.1", platform: :ruby
|
|
36
39
|
elsif rails_version >= Gem::Version.new("7.1.0")
|
|
37
40
|
gem "psych", "~> 4.0.0"
|
|
38
|
-
gem "rspec-rails"
|
|
41
|
+
gem "rspec-rails", "~> 7.0"
|
|
39
42
|
gem "sqlite3", "~> 1.7.3", platform: :ruby
|
|
40
43
|
elsif rails_version >= Gem::Version.new("6.1.0")
|
|
41
|
-
gem "rspec-rails", "~>
|
|
42
|
-
|
|
44
|
+
gem "rspec-rails", "~> 6.0"
|
|
43
45
|
gem "sqlite3", "~> 1.7.3", platform: :ruby
|
|
44
46
|
else
|
|
45
47
|
gem "psych", "~> 3.0.0"
|
data/bin/test
CHANGED
|
@@ -26,6 +26,8 @@ module Sentry
|
|
|
26
26
|
#
|
|
27
27
|
# @param event [ActiveSupport::Notifications::Event] The email delivery event
|
|
28
28
|
def deliver(event)
|
|
29
|
+
return unless Sentry.initialized?
|
|
30
|
+
|
|
29
31
|
payload = event.payload
|
|
30
32
|
|
|
31
33
|
mailer = payload[:mailer]
|
|
@@ -57,6 +59,8 @@ module Sentry
|
|
|
57
59
|
#
|
|
58
60
|
# @param event [ActiveSupport::Notifications::Event] The email processing event
|
|
59
61
|
def process(event)
|
|
62
|
+
return unless Sentry.initialized?
|
|
63
|
+
|
|
60
64
|
payload = event.payload
|
|
61
65
|
|
|
62
66
|
mailer = payload[:mailer]
|
|
@@ -26,6 +26,8 @@ module Sentry
|
|
|
26
26
|
#
|
|
27
27
|
# @param event [ActiveSupport::Notifications::Event] The job performance event
|
|
28
28
|
def perform(event)
|
|
29
|
+
return unless Sentry.initialized?
|
|
30
|
+
|
|
29
31
|
job = event.payload[:job]
|
|
30
32
|
duration = duration_ms(event)
|
|
31
33
|
|
|
@@ -63,6 +65,8 @@ module Sentry
|
|
|
63
65
|
#
|
|
64
66
|
# @param event [ActiveSupport::Notifications::Event] The job enqueue event
|
|
65
67
|
def enqueue(event)
|
|
68
|
+
return unless Sentry.initialized?
|
|
69
|
+
|
|
66
70
|
job = event.payload[:job]
|
|
67
71
|
|
|
68
72
|
attributes = {
|
|
@@ -89,6 +93,8 @@ module Sentry
|
|
|
89
93
|
end
|
|
90
94
|
|
|
91
95
|
def retry_stopped(event)
|
|
96
|
+
return unless Sentry.initialized?
|
|
97
|
+
|
|
92
98
|
job = event.payload[:job]
|
|
93
99
|
error = event.payload[:error]
|
|
94
100
|
|
|
@@ -111,6 +117,8 @@ module Sentry
|
|
|
111
117
|
end
|
|
112
118
|
|
|
113
119
|
def discard(event)
|
|
120
|
+
return unless Sentry.initialized?
|
|
121
|
+
|
|
114
122
|
job = event.payload[:job]
|
|
115
123
|
error = event.payload[:error]
|
|
116
124
|
|
|
@@ -29,6 +29,7 @@ module Sentry
|
|
|
29
29
|
#
|
|
30
30
|
# @param event [ActiveSupport::Notifications::Event] The SQL event
|
|
31
31
|
def sql(event)
|
|
32
|
+
return unless Sentry.initialized?
|
|
32
33
|
return if EXCLUDED_NAMES.include?(event.payload[:name])
|
|
33
34
|
|
|
34
35
|
sql = event.payload[:sql]
|
|
@@ -46,6 +47,17 @@ module Sentry
|
|
|
46
47
|
cached: cached
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
binds = event.payload[:binds]
|
|
51
|
+
|
|
52
|
+
if Sentry.configuration.send_default_pii && !binds&.empty?
|
|
53
|
+
type_casted_binds = type_casted_binds(event)
|
|
54
|
+
|
|
55
|
+
binds.each_with_index do |bind, index|
|
|
56
|
+
name = bind.is_a?(Symbol) ? bind : bind.name
|
|
57
|
+
attributes["db.query.parameter.#{name}"] = type_casted_binds[index].to_s
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
49
61
|
attributes[:statement_name] = statement_name if statement_name && statement_name != "SQL"
|
|
50
62
|
attributes[:connection_id] = connection_id if connection_id
|
|
51
63
|
|
|
@@ -60,6 +72,16 @@ module Sentry
|
|
|
60
72
|
)
|
|
61
73
|
end
|
|
62
74
|
|
|
75
|
+
if RUBY_ENGINE == "jruby"
|
|
76
|
+
def type_casted_binds(event)
|
|
77
|
+
event.payload[:type_casted_binds].call
|
|
78
|
+
end
|
|
79
|
+
else
|
|
80
|
+
def type_casted_binds(event)
|
|
81
|
+
event.payload[:type_casted_binds]
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
63
85
|
private
|
|
64
86
|
|
|
65
87
|
def build_log_message(statement_name)
|
data/lib/sentry/rails/version.rb
CHANGED
data/sentry-rails.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sentry-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sentry Team
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 6.
|
|
32
|
+
version: 6.1.0
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 6.
|
|
39
|
+
version: 6.1.0
|
|
40
40
|
description: A gem that provides Rails integration for the Sentry error logger
|
|
41
41
|
email: accounts@sentry.io
|
|
42
42
|
executables: []
|
|
@@ -89,15 +89,15 @@ files:
|
|
|
89
89
|
- lib/sentry/rails/tracing/active_support_subscriber.rb
|
|
90
90
|
- lib/sentry/rails/version.rb
|
|
91
91
|
- sentry-rails.gemspec
|
|
92
|
-
homepage: https://github.com/getsentry/sentry-ruby/tree/6.
|
|
92
|
+
homepage: https://github.com/getsentry/sentry-ruby/tree/6.1.0/sentry-rails
|
|
93
93
|
licenses:
|
|
94
94
|
- MIT
|
|
95
95
|
metadata:
|
|
96
|
-
homepage_uri: https://github.com/getsentry/sentry-ruby/tree/6.
|
|
97
|
-
source_code_uri: https://github.com/getsentry/sentry-ruby/tree/6.
|
|
98
|
-
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/6.
|
|
96
|
+
homepage_uri: https://github.com/getsentry/sentry-ruby/tree/6.1.0/sentry-rails
|
|
97
|
+
source_code_uri: https://github.com/getsentry/sentry-ruby/tree/6.1.0/sentry-rails
|
|
98
|
+
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/6.1.0/CHANGELOG.md
|
|
99
99
|
bug_tracker_uri: https://github.com/getsentry/sentry-ruby/issues
|
|
100
|
-
documentation_uri: http://www.rubydoc.info/gems/sentry-rails/6.
|
|
100
|
+
documentation_uri: http://www.rubydoc.info/gems/sentry-rails/6.1.0
|
|
101
101
|
rdoc_options: []
|
|
102
102
|
require_paths:
|
|
103
103
|
- lib
|