sentry-rails 4.5.0.pre.beta.1 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -6
- data/Gemfile +5 -7
- data/lib/sentry/rails/breadcrumb/active_support_logger.rb +3 -7
- data/lib/sentry/rails/instrument_payload_cleanup_helper.rb +13 -0
- data/lib/sentry/rails/railtie.rb +7 -1
- data/lib/sentry/rails/tracing/action_controller_subscriber.rb +4 -2
- data/lib/sentry/rails/version.rb +1 -1
- data/sentry-rails.gemspec +2 -2
- metadata +8 -8
- data/.craft.yml +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1db1f092b77a25a14fa9febdd1343b70b2cf1f52c014336162879bfb973a665
|
4
|
+
data.tar.gz: 242dd27699605d63858062419b87da9c69c394abf38f7286451e470d92029c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf059162ee26ba6252de2d326474c5ce2984358cc75aa12389013c3e8e16a716ae0f53e06245f2caf26aa21dad43ee4a14956ba9af734057fa7688740b7b0251
|
7
|
+
data.tar.gz: 3c1fc08e21ba85a1fbe320d46ad8ae2519e0a8afa2544b459bcc5ab2833c12e0cd9b6f46f3309d33833c3f941005947ee75849c31e480eba4fbe0839a4419c19
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
### Bug Fixes
|
6
|
-
|
7
|
-
- Disable background worker for runner mode [#1448](https://github.com/getsentry/sentry-ruby/pull/1448)
|
8
|
-
- Fixes [#1324](https://github.com/getsentry/sentry-ruby/issues/1324)
|
3
|
+
Individual gem's changelog has been deprecated. Please check the [project changelog](https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md).
|
9
4
|
|
10
5
|
## 4.4.0
|
11
6
|
|
data/Gemfile
CHANGED
@@ -2,6 +2,7 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in sentry-ruby.gemspec
|
4
4
|
gemspec
|
5
|
+
gem "sentry-ruby", path: "../sentry-ruby"
|
5
6
|
|
6
7
|
rails_version = ENV["RAILS_VERSION"]
|
7
8
|
rails_version = "6.1.0" if rails_version.nil?
|
@@ -18,6 +19,8 @@ end
|
|
18
19
|
gem "rails", "~> #{rails_version}"
|
19
20
|
gem "sprockets-rails"
|
20
21
|
|
22
|
+
gem "sidekiq"
|
23
|
+
|
21
24
|
gem "rspec", "~> 3.0"
|
22
25
|
gem "rspec-retry"
|
23
26
|
gem "rspec-rails", "~> 4.0"
|
@@ -25,13 +28,8 @@ gem "codecov", "0.2.12"
|
|
25
28
|
|
26
29
|
gem "rake", "~> 12.0"
|
27
30
|
|
28
|
-
|
29
|
-
gem "
|
30
|
-
|
31
|
-
gem "sidekiq"
|
32
|
-
|
33
|
-
gem "sentry-ruby", path: "../sentry-ruby"
|
34
|
-
|
31
|
+
gem "object_tracer"
|
32
|
+
gem "debug", github: "ruby/debug" if RUBY_VERSION.to_f >= 2.6
|
35
33
|
gem "pry"
|
36
34
|
|
37
35
|
gem "benchmark-ips"
|
@@ -1,9 +1,11 @@
|
|
1
|
+
require "sentry/rails/instrument_payload_cleanup_helper"
|
2
|
+
|
1
3
|
module Sentry
|
2
4
|
module Rails
|
3
5
|
module Breadcrumb
|
4
6
|
module ActiveSupportLogger
|
5
7
|
class << self
|
6
|
-
|
8
|
+
include InstrumentPayloadCleanupHelper
|
7
9
|
|
8
10
|
def add(name, started, _finished, _unique_id, data)
|
9
11
|
# skip Rails' internal events
|
@@ -23,12 +25,6 @@ module Sentry
|
|
23
25
|
Sentry.add_breadcrumb(crumb)
|
24
26
|
end
|
25
27
|
|
26
|
-
def cleanup_data(data)
|
27
|
-
IGNORED_DATA_TYPES.each do |key|
|
28
|
-
data.delete(key) if data.key?(key)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
28
|
def inject
|
33
29
|
@subscriber = ::ActiveSupport::Notifications.subscribe(/.*/) do |name, started, finished, unique_id, data|
|
34
30
|
# we only record events that has a started timestamp
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Sentry
|
2
|
+
module Rails
|
3
|
+
module InstrumentPayloadCleanupHelper
|
4
|
+
IGNORED_DATA_TYPES = [:request, :response, :headers, :exception, :exception_object]
|
5
|
+
|
6
|
+
def cleanup_data(data)
|
7
|
+
IGNORED_DATA_TYPES.each do |key|
|
8
|
+
data.delete(key) if data.key?(key)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/sentry/rails/railtie.rb
CHANGED
@@ -12,13 +12,19 @@ module Sentry
|
|
12
12
|
app.config.middleware.use(Sentry::Rails::RescuedExceptionInterceptor)
|
13
13
|
end
|
14
14
|
|
15
|
+
# because the extension works by registering the around_perform callcack, it should always be ran
|
16
|
+
# before the application is eager-loaded (before user's jobs register their own callbacks)
|
17
|
+
# See https://github.com/getsentry/sentry-ruby/issues/1249#issuecomment-853871871 for the detail explanation
|
18
|
+
initializer "sentry.extend_active_job", before: :eager_load! do |app|
|
19
|
+
extend_active_job if defined?(ActiveJob)
|
20
|
+
end
|
21
|
+
|
15
22
|
config.after_initialize do |app|
|
16
23
|
next unless Sentry.initialized?
|
17
24
|
|
18
25
|
configure_project_root
|
19
26
|
configure_trusted_proxies
|
20
27
|
extend_controller_methods if defined?(ActionController)
|
21
|
-
extend_active_job if defined?(ActiveJob)
|
22
28
|
patch_background_worker if defined?(ActiveRecord)
|
23
29
|
override_streaming_reporter if defined?(ActionView)
|
24
30
|
setup_backtrace_cleanup_callback
|
@@ -1,9 +1,12 @@
|
|
1
1
|
require "sentry/rails/tracing/abstract_subscriber"
|
2
|
+
require "sentry/rails/instrument_payload_cleanup_helper"
|
2
3
|
|
3
4
|
module Sentry
|
4
5
|
module Rails
|
5
6
|
module Tracing
|
6
7
|
class ActionControllerSubscriber < AbstractSubscriber
|
8
|
+
extend InstrumentPayloadCleanupHelper
|
9
|
+
|
7
10
|
EVENT_NAME = "process_action.action_controller".freeze
|
8
11
|
|
9
12
|
def self.subscribe!
|
@@ -18,8 +21,7 @@ module Sentry
|
|
18
21
|
duration: duration
|
19
22
|
) do |span|
|
20
23
|
payload = payload.dup
|
21
|
-
payload
|
22
|
-
payload.delete(:request)
|
24
|
+
cleanup_data(payload)
|
23
25
|
span.set_data(:payload, payload)
|
24
26
|
span.set_http_status(payload[:status])
|
25
27
|
end
|
data/lib/sentry/rails/version.rb
CHANGED
data/sentry-rails.gemspec
CHANGED
@@ -16,12 +16,12 @@ Gem::Specification.new do |spec|
|
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = spec.homepage
|
19
|
-
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/
|
19
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
20
20
|
|
21
21
|
spec.bindir = "exe"
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency "railties", ">= 5.0"
|
26
|
-
spec.add_dependency "sentry-ruby-core", "~> 4.
|
26
|
+
spec.add_dependency "sentry-ruby-core", "~> 4.6.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: 4.
|
4
|
+
version: 4.6.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: 2021-
|
11
|
+
date: 2021-06-30 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.
|
33
|
+
version: 4.6.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: 4.
|
40
|
+
version: 4.6.0
|
41
41
|
description: A gem that provides Rails integration for the Sentry error logger
|
42
42
|
email: accounts@sentry.io
|
43
43
|
executables: []
|
@@ -46,7 +46,6 @@ extra_rdoc_files:
|
|
46
46
|
- README.md
|
47
47
|
- LICENSE.txt
|
48
48
|
files:
|
49
|
-
- ".craft.yml"
|
50
49
|
- ".gitignore"
|
51
50
|
- ".rspec"
|
52
51
|
- CHANGELOG.md
|
@@ -70,6 +69,7 @@ files:
|
|
70
69
|
- lib/sentry/rails/controller_methods.rb
|
71
70
|
- lib/sentry/rails/controller_transaction.rb
|
72
71
|
- lib/sentry/rails/engine.rb
|
72
|
+
- lib/sentry/rails/instrument_payload_cleanup_helper.rb
|
73
73
|
- lib/sentry/rails/overrides/streaming_reporter.rb
|
74
74
|
- lib/sentry/rails/railtie.rb
|
75
75
|
- lib/sentry/rails/rescued_exception_interceptor.rb
|
@@ -86,7 +86,7 @@ licenses:
|
|
86
86
|
metadata:
|
87
87
|
homepage_uri: https://github.com/getsentry/sentry-ruby
|
88
88
|
source_code_uri: https://github.com/getsentry/sentry-ruby
|
89
|
-
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/
|
89
|
+
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md
|
90
90
|
post_install_message:
|
91
91
|
rdoc_options: []
|
92
92
|
require_paths:
|
@@ -98,9 +98,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '2.4'
|
99
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubygems_version: 3.1.6
|
106
106
|
signing_key:
|
data/.craft.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
minVersion: '0.13.2'
|
2
|
-
github:
|
3
|
-
owner: getsentry
|
4
|
-
repo: sentry-ruby
|
5
|
-
changelogPolicy: simple
|
6
|
-
preReleaseCommand: ruby ../.scripts/bump-version.rb
|
7
|
-
releaseBranchPrefix: release-sentry-rails
|
8
|
-
statusProvider:
|
9
|
-
name: github
|
10
|
-
artifactProvider:
|
11
|
-
name: github
|
12
|
-
targets:
|
13
|
-
- name: gem
|
14
|
-
- name: registry
|
15
|
-
type: sdk
|
16
|
-
config:
|
17
|
-
canonical: 'gem:sentry-rails'
|
18
|
-
- name: github
|
19
|
-
tagPrefix: sentry-rails-v
|