sentry-raven 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.craft.yml +9 -5
- data/.scripts/bump-version.rb +5 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile +5 -1
- data/Makefile +3 -0
- data/README.md +19 -7
- data/lib/raven/base.rb +1 -0
- data/lib/raven/configuration.rb +0 -1
- data/lib/raven/event.rb +5 -1
- data/lib/raven/instance.rb +7 -1
- data/lib/raven/integrations/delayed_job.rb +1 -1
- data/lib/raven/integrations/rack.rb +2 -14
- data/lib/raven/transports/http.rb +2 -1
- data/lib/raven/utils/request_id.rb +16 -0
- data/lib/raven/version.rb +1 -1
- data/sentry-raven.gemspec +7 -0
- metadata +10 -148
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
- data/.github/pull_request_template.md +0 -16
- data/.github/workflows/test.yml +0 -92
- data/.github/workflows/zeus_upload.yml +0 -32
- data/.gitignore +0 -16
- data/.gitmodules +0 -0
- data/.rspec +0 -1
- data/.rubocop.yml +0 -112
- data/.scripts/bump-version.sh +0 -9
- data/CONTRIBUTING.md +0 -71
- data/sentry-ruby/.gitignore +0 -11
- data/sentry-ruby/.rspec +0 -3
- data/sentry-ruby/.travis.yml +0 -6
- data/sentry-ruby/CODE_OF_CONDUCT.md +0 -74
- data/sentry-ruby/Gemfile +0 -9
- data/sentry-ruby/LICENSE.txt +0 -21
- data/sentry-ruby/README.md +0 -44
- data/sentry-ruby/Rakefile +0 -6
- data/sentry-ruby/bin/console +0 -14
- data/sentry-ruby/bin/setup +0 -8
- data/sentry-ruby/examples/rails-6.0/.browserslistrc +0 -1
- data/sentry-ruby/examples/rails-6.0/.gitignore +0 -35
- data/sentry-ruby/examples/rails-6.0/Gemfile +0 -58
- data/sentry-ruby/examples/rails-6.0/README.md +0 -23
- data/sentry-ruby/examples/rails-6.0/Rakefile +0 -6
- data/sentry-ruby/examples/rails-6.0/app/assets/config/manifest.js +0 -2
- data/sentry-ruby/examples/rails-6.0/app/assets/images/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/app/assets/stylesheets/application.css +0 -15
- data/sentry-ruby/examples/rails-6.0/app/channels/application_cable/channel.rb +0 -4
- data/sentry-ruby/examples/rails-6.0/app/channels/application_cable/connection.rb +0 -4
- data/sentry-ruby/examples/rails-6.0/app/controllers/application_controller.rb +0 -2
- data/sentry-ruby/examples/rails-6.0/app/controllers/concerns/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/app/controllers/welcome_controller.rb +0 -23
- data/sentry-ruby/examples/rails-6.0/app/helpers/application_helper.rb +0 -2
- data/sentry-ruby/examples/rails-6.0/app/javascript/channels/consumer.js +0 -6
- data/sentry-ruby/examples/rails-6.0/app/javascript/channels/index.js +0 -5
- data/sentry-ruby/examples/rails-6.0/app/javascript/packs/application.js +0 -17
- data/sentry-ruby/examples/rails-6.0/app/jobs/application_job.rb +0 -7
- data/sentry-ruby/examples/rails-6.0/app/mailers/application_mailer.rb +0 -4
- data/sentry-ruby/examples/rails-6.0/app/models/application_record.rb +0 -3
- data/sentry-ruby/examples/rails-6.0/app/models/concerns/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/app/views/layouts/application.html.erb +0 -15
- data/sentry-ruby/examples/rails-6.0/app/views/layouts/mailer.html.erb +0 -13
- data/sentry-ruby/examples/rails-6.0/app/views/layouts/mailer.text.erb +0 -1
- data/sentry-ruby/examples/rails-6.0/app/views/welcome/report_demo.html.erb +0 -22
- data/sentry-ruby/examples/rails-6.0/app/views/welcome/view_error.html.erb +0 -1
- data/sentry-ruby/examples/rails-6.0/app/workers/error_worker.rb +0 -7
- data/sentry-ruby/examples/rails-6.0/babel.config.js +0 -72
- data/sentry-ruby/examples/rails-6.0/bin/bundle +0 -114
- data/sentry-ruby/examples/rails-6.0/bin/rails +0 -9
- data/sentry-ruby/examples/rails-6.0/bin/rake +0 -9
- data/sentry-ruby/examples/rails-6.0/bin/setup +0 -36
- data/sentry-ruby/examples/rails-6.0/bin/spring +0 -17
- data/sentry-ruby/examples/rails-6.0/bin/webpack +0 -18
- data/sentry-ruby/examples/rails-6.0/bin/webpack-dev-server +0 -18
- data/sentry-ruby/examples/rails-6.0/bin/yarn +0 -11
- data/sentry-ruby/examples/rails-6.0/config.ru +0 -5
- data/sentry-ruby/examples/rails-6.0/config/application.rb +0 -28
- data/sentry-ruby/examples/rails-6.0/config/boot.rb +0 -4
- data/sentry-ruby/examples/rails-6.0/config/cable.yml +0 -10
- data/sentry-ruby/examples/rails-6.0/config/credentials.yml.enc +0 -1
- data/sentry-ruby/examples/rails-6.0/config/database.yml +0 -25
- data/sentry-ruby/examples/rails-6.0/config/environment.rb +0 -5
- data/sentry-ruby/examples/rails-6.0/config/environments/development.rb +0 -62
- data/sentry-ruby/examples/rails-6.0/config/environments/production.rb +0 -112
- data/sentry-ruby/examples/rails-6.0/config/environments/test.rb +0 -48
- data/sentry-ruby/examples/rails-6.0/config/initializers/application_controller_renderer.rb +0 -8
- data/sentry-ruby/examples/rails-6.0/config/initializers/assets.rb +0 -14
- data/sentry-ruby/examples/rails-6.0/config/initializers/backtrace_silencers.rb +0 -7
- data/sentry-ruby/examples/rails-6.0/config/initializers/content_security_policy.rb +0 -30
- data/sentry-ruby/examples/rails-6.0/config/initializers/cookies_serializer.rb +0 -5
- data/sentry-ruby/examples/rails-6.0/config/initializers/filter_parameter_logging.rb +0 -4
- data/sentry-ruby/examples/rails-6.0/config/initializers/inflections.rb +0 -16
- data/sentry-ruby/examples/rails-6.0/config/initializers/mime_types.rb +0 -4
- data/sentry-ruby/examples/rails-6.0/config/initializers/wrap_parameters.rb +0 -14
- data/sentry-ruby/examples/rails-6.0/config/locales/en.yml +0 -33
- data/sentry-ruby/examples/rails-6.0/config/puma.rb +0 -38
- data/sentry-ruby/examples/rails-6.0/config/routes.rb +0 -10
- data/sentry-ruby/examples/rails-6.0/config/spring.rb +0 -6
- data/sentry-ruby/examples/rails-6.0/config/storage.yml +0 -34
- data/sentry-ruby/examples/rails-6.0/config/webpack/development.js +0 -5
- data/sentry-ruby/examples/rails-6.0/config/webpack/environment.js +0 -3
- data/sentry-ruby/examples/rails-6.0/config/webpack/production.js +0 -5
- data/sentry-ruby/examples/rails-6.0/config/webpack/test.js +0 -5
- data/sentry-ruby/examples/rails-6.0/config/webpacker.yml +0 -96
- data/sentry-ruby/examples/rails-6.0/db/seeds.rb +0 -7
- data/sentry-ruby/examples/rails-6.0/lib/assets/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/lib/tasks/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/package.json +0 -15
- data/sentry-ruby/examples/rails-6.0/postcss.config.js +0 -12
- data/sentry-ruby/examples/rails-6.0/public/404.html +0 -67
- data/sentry-ruby/examples/rails-6.0/public/422.html +0 -67
- data/sentry-ruby/examples/rails-6.0/public/500.html +0 -66
- data/sentry-ruby/examples/rails-6.0/public/apple-touch-icon-precomposed.png +0 -0
- data/sentry-ruby/examples/rails-6.0/public/apple-touch-icon.png +0 -0
- data/sentry-ruby/examples/rails-6.0/public/favicon.ico +0 -0
- data/sentry-ruby/examples/rails-6.0/public/robots.txt +0 -1
- data/sentry-ruby/examples/rails-6.0/storage/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/application_system_test_case.rb +0 -5
- data/sentry-ruby/examples/rails-6.0/test/channels/application_cable/connection_test.rb +0 -11
- data/sentry-ruby/examples/rails-6.0/test/controllers/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/fixtures/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/fixtures/files/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/helpers/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/integration/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/mailers/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/models/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/system/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/test_helper.rb +0 -13
- data/sentry-ruby/examples/rails-6.0/vendor/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/yarn.lock +0 -7508
- data/sentry-ruby/lib/sentry.rb +0 -16
- data/sentry-ruby/lib/sentry/backtrace.rb +0 -128
- data/sentry-ruby/lib/sentry/client.rb +0 -162
- data/sentry-ruby/lib/sentry/client/state.rb +0 -40
- data/sentry-ruby/lib/sentry/configuration.rb +0 -533
- data/sentry-ruby/lib/sentry/event.rb +0 -209
- data/sentry-ruby/lib/sentry/interface.rb +0 -31
- data/sentry-ruby/lib/sentry/interfaces/exception.rb +0 -15
- data/sentry-ruby/lib/sentry/interfaces/http.rb +0 -16
- data/sentry-ruby/lib/sentry/interfaces/message.rb +0 -18
- data/sentry-ruby/lib/sentry/interfaces/single_exception.rb +0 -14
- data/sentry-ruby/lib/sentry/interfaces/stack_trace.rb +0 -69
- data/sentry-ruby/lib/sentry/linecache.rb +0 -44
- data/sentry-ruby/lib/sentry/logger.rb +0 -20
- data/sentry-ruby/lib/sentry/transports.rb +0 -19
- data/sentry-ruby/lib/sentry/transports/dummy.rb +0 -16
- data/sentry-ruby/lib/sentry/transports/http.rb +0 -66
- data/sentry-ruby/lib/sentry/transports/stdout.rb +0 -20
- data/sentry-ruby/lib/sentry/utils/deep_merge.rb +0 -22
- data/sentry-ruby/lib/sentry/utils/exception_cause_chain.rb +0 -20
- data/sentry-ruby/lib/sentry/version.rb +0 -3
- data/sentry-ruby/sentry-ruby.gemspec +0 -26
- data/sentry-ruby/spec/sentry/backtrace_spec.rb +0 -38
- data/sentry-ruby/spec/sentry/client_spec.rb +0 -443
- data/sentry-ruby/spec/sentry/configuration_spec.rb +0 -400
- data/sentry-ruby/spec/sentry/event_spec.rb +0 -238
- data/sentry-ruby/spec/sentry/interface_spec.rb +0 -38
- data/sentry-ruby/spec/sentry/interfaces/stack_trace_spec.rb +0 -11
- data/sentry-ruby/spec/sentry/linecache_spec.rb +0 -40
- data/sentry-ruby/spec/sentry/transports/http_spec.rb +0 -57
- data/sentry-ruby/spec/sentry/transports/stdout_spec.rb +0 -11
- data/sentry-ruby/spec/sentry_spec.rb +0 -9
- data/sentry-ruby/spec/spec_helper.rb +0 -49
- data/sentry-ruby/spec/support/linecache.txt +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c836de333d5f6013b562a5d189b6e775ca61965c7070a111b61d37402d318d1
|
4
|
+
data.tar.gz: b1923aeea7733a7e0d51fdc6e2f49b7dd046b5eaaba1067507229d0cc5262352
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ae04b49b38a134386b44e04675f47bbf9742ba1b39f84ac0c51a87b3852380c1b60d91a7a7c67e208a9415c75880559941ac343cb3378a8129259b4aeb63984
|
7
|
+
data.tar.gz: 0fd029cf50d3a54f98906cee4f1c4177282f91030239f093d53e3949bc37a533fd4557f6f932e5c22051416e92ff28a53da7fbc2a9086c83181538f8c81d6c83
|
data/.craft.yml
CHANGED
@@ -1,14 +1,18 @@
|
|
1
|
-
minVersion: '0.
|
1
|
+
minVersion: '0.13.2'
|
2
2
|
github:
|
3
3
|
owner: getsentry
|
4
|
-
repo:
|
4
|
+
repo: sentry-ruby
|
5
5
|
changelogPolicy: simple
|
6
|
-
preReleaseCommand: ruby .scripts/bump-version.
|
7
|
-
|
8
|
-
|
6
|
+
preReleaseCommand: ruby .scripts/bump-version.rb
|
7
|
+
releaseBranchPrefix: release-sentry-raven
|
8
|
+
statusProvider:
|
9
|
+
name: github
|
10
|
+
artifactProvider:
|
11
|
+
name: github
|
9
12
|
targets:
|
10
13
|
- name: gem
|
11
14
|
- name: github
|
15
|
+
tagPrefix: sentry-raven-v
|
12
16
|
- name: registry
|
13
17
|
type: sdk
|
14
18
|
config:
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.1.2
|
4
|
+
|
5
|
+
- Fix Delayed::Plugins::Raven when job raises exception [#1057](https://github.com/getsentry/sentry-ruby/pull/1057)
|
6
|
+
- Merge hash instead of replacing the original value in user_context [#1064](https://github.com/getsentry/sentry-ruby/pull/1064)
|
7
|
+
- Don't exclude ActionView::MissingTemplate error by default [#1092](https://github.com/getsentry/sentry-ruby/pull/1092)
|
8
|
+
- Fix typo: much -> must for Raven::Event [#1106](https://github.com/getsentry/sentry-ruby/pull/1106)
|
9
|
+
- Fix undefined local variable or method logger [#1143](https://github.com/getsentry/sentry-ruby/pull/1143)
|
10
|
+
- Fixes [#1110](https://github.com/getsentry/sentry-ruby/issues/1110)
|
11
|
+
- fix format headers for sentry-raven [#1198](https://github.com/getsentry/sentry-ruby/pull/1198)
|
12
|
+
- Print deprecation message after sentry-raven is installed [#1206](https://github.com/getsentry/sentry-ruby/pull/1206)
|
13
|
+
|
3
14
|
## 3.1.1
|
4
15
|
|
5
16
|
**Feature**
|
data/Gemfile
CHANGED
@@ -10,11 +10,15 @@ if rails_version.to_f != 0
|
|
10
10
|
gem "rspec-rails", "~> 4.0"
|
11
11
|
end
|
12
12
|
|
13
|
+
gem "delayed_job"
|
13
14
|
gem "sidekiq"
|
14
15
|
|
15
16
|
gem "rack"
|
16
17
|
gem "rack-timeout"
|
17
18
|
|
19
|
+
# TODO: Remove this if https://github.com/jruby/jruby/issues/6547 is addressed
|
20
|
+
gem "i18n", "<= 1.8.7"
|
21
|
+
|
18
22
|
gem "pry"
|
19
23
|
gem "benchmark-ips"
|
20
24
|
gem "benchmark_driver"
|
@@ -30,4 +34,4 @@ gem "puma" # rspec system tests
|
|
30
34
|
gem "timecop"
|
31
35
|
gem "test-unit"
|
32
36
|
gem "simplecov"
|
33
|
-
gem "codecov"
|
37
|
+
gem "codecov", "<= 0.2.12"
|
data/Makefile
ADDED
data/README.md
CHANGED
@@ -7,14 +7,26 @@
|
|
7
7
|
|
8
8
|
# Raven-Ruby, the Ruby Client for Sentry
|
9
9
|
|
10
|
-
### 🚧
|
10
|
+
### 🚧 Migrating To The New SDK 🚧
|
11
|
+
|
12
|
+
We've released our new Ruby SDK, [sentry-ruby](https://github.com/getsentry/sentry-ruby/tree/master/sentry-ruby). Here are the benefits of migrating to it:
|
13
|
+
|
14
|
+
- **Unified Interfaces With Other SDKs:** The design of `sentry-raven` is outdated compared with our modern Sentry SDKs. If you also use other Sentry SDKs, such as Sentry's JavaScript SDK for your frontend application, you'll notice that their interfaces are quite different from the one provided for `sentry-raven`. The new `sentry-ruby` SDK provides a more consistent user experience across all different platforms.
|
15
|
+
|
16
|
+
- **Performance Monitoring:** The Sentry Ruby SDK includes [performance monitoring](https://docs.sentry.io/product/performance/), which you can enable if you haven't already as ([discussed here](https://docs.sentry.io/platforms/ruby/performance/)).
|
17
|
+
|
18
|
+
- **Future Support:** `sentry-raven` has entered maintenance mode, which means it won't receive any new feature supports or aggressive bug fixes.
|
19
|
+
|
20
|
+
- **Better Extensibility:** Unlike `sentry-raven`, `sentry-ruby` is built with extensibility in mind and will allow the community to build extensions for different integrations/features.
|
21
|
+
|
22
|
+
If you're interested in the migration, please also read our [migration guide](https://docs.sentry.io/platforms/ruby/migration/) for more information.
|
11
23
|
|
12
24
|
---
|
13
25
|
|
14
26
|
|
15
27
|
[![Gem Version](https://img.shields.io/gem/v/sentry-raven.svg)](https://rubygems.org/gems/sentry-raven)
|
16
28
|
![Build Status](https://github.com/getsentry/raven-ruby/workflows/Test/badge.svg)
|
17
|
-
[![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/
|
29
|
+
[![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master)
|
18
30
|
[![Gem](https://img.shields.io/gem/dt/sentry-raven.svg)](https://rubygems.org/gems/sentry-raven/)
|
19
31
|
[![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-raven&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-raven&package-manager=bundler&version-scheme=semver)
|
20
32
|
|
@@ -55,11 +67,11 @@ end
|
|
55
67
|
|
56
68
|
**Raven ignores some exceptions by default** - most of these are related to 404s or controller actions not being found. [For a complete list, see the `IGNORE_DEFAULT` constant](https://github.com/getsentry/raven-ruby/blob/master/lib/raven/configuration.rb).
|
57
69
|
|
58
|
-
Raven doesn't report POST data or cookies by default. In addition, it will attempt to remove any obviously sensitive data, such as credit card or Social Security numbers. For more information about how Sentry processes your data, [check out the documentation on the `processors` config setting.](https://docs.sentry.io/platforms/ruby/
|
70
|
+
Raven doesn't report POST data or cookies by default. In addition, it will attempt to remove any obviously sensitive data, such as credit card or Social Security numbers. For more information about how Sentry processes your data, [check out the documentation on the `processors` config setting.](https://docs.sentry.io/platforms/ruby/configuration/options/)
|
59
71
|
|
60
72
|
### Usage
|
61
73
|
|
62
|
-
**If you use Rails, you're already done - no more configuration required!** Check [Integrations](https://docs.sentry.io/platforms/ruby/integrations/) for more details on other gems Sentry integrates with automatically.
|
74
|
+
**If you use Rails, you're already done - no more configuration required!** Check [Integrations](https://docs.sentry.io/platforms/ruby/configuration/integrations/) for more details on other gems Sentry integrates with automatically.
|
63
75
|
|
64
76
|
Otherwise, Raven supports two methods of capturing exceptions:
|
65
77
|
|
@@ -123,9 +135,9 @@ Much of the usefulness of Sentry comes from additional context data with the eve
|
|
123
135
|
```ruby
|
124
136
|
Raven.user_context email: 'foo@example.com'
|
125
137
|
|
126
|
-
Raven.
|
138
|
+
Raven.tags_context interesting: 'yes'
|
127
139
|
|
128
|
-
Raven.
|
140
|
+
Raven.extra_context additional_info: 'foo'
|
129
141
|
```
|
130
142
|
|
131
143
|
You can also use `tags_context` and `extra_context` to provide scoped information:
|
@@ -142,7 +154,7 @@ Raven.extra_context(additional_info: 'foo') do
|
|
142
154
|
end
|
143
155
|
```
|
144
156
|
|
145
|
-
For more information, see [Context](https://docs.sentry.io/
|
157
|
+
For more information, see [Context](https://docs.sentry.io/platforms/ruby/enriching-events/context/).
|
146
158
|
|
147
159
|
## More Information
|
148
160
|
|
data/lib/raven/base.rb
CHANGED
data/lib/raven/configuration.rb
CHANGED
@@ -211,7 +211,6 @@ module Raven
|
|
211
211
|
'ActionController::UnknownFormat',
|
212
212
|
'ActionController::UnknownHttpMethod',
|
213
213
|
'ActionDispatch::Http::Parameters::ParseError',
|
214
|
-
'ActionView::MissingTemplate',
|
215
214
|
'ActiveJob::DeserializationError', # Can cause infinite loops
|
216
215
|
'ActiveRecord::RecordNotFound',
|
217
216
|
'CGI::Session::CookieStore::TamperedWithCookie',
|
data/lib/raven/event.rb
CHANGED
@@ -38,7 +38,7 @@ module Raven
|
|
38
38
|
self.tags = {} # TODO: contexts
|
39
39
|
|
40
40
|
unless REQUIRED_OPTION_KEYS.all? { |key| options.key?(key) }
|
41
|
-
raise "you
|
41
|
+
raise "you must provide configuration, context, and breadcrumbs when initializing a Raven::Event"
|
42
42
|
end
|
43
43
|
|
44
44
|
self.configuration = options[:configuration]
|
@@ -226,6 +226,10 @@ module Raven
|
|
226
226
|
int.from_rack(context.rack_env)
|
227
227
|
end
|
228
228
|
context.user[:ip_address] = calculate_real_ip_from_rack
|
229
|
+
|
230
|
+
if request_id = Utils::RequestId.read_from(context.rack_env)
|
231
|
+
context.tags[:request_id] = request_id
|
232
|
+
end
|
229
233
|
end
|
230
234
|
|
231
235
|
# When behind a proxy (or if the user is using a proxy), we can't use
|
data/lib/raven/instance.rb
CHANGED
@@ -177,7 +177,13 @@ module Raven
|
|
177
177
|
# Raven.user_context('id' => 1, 'email' => 'foo@example.com')
|
178
178
|
def user_context(options = nil)
|
179
179
|
original_user_context = context.user
|
180
|
-
|
180
|
+
|
181
|
+
if options
|
182
|
+
context.user.merge!(options)
|
183
|
+
else
|
184
|
+
context.user = {}
|
185
|
+
end
|
186
|
+
|
181
187
|
yield if block_given?
|
182
188
|
context.user
|
183
189
|
ensure
|
@@ -30,7 +30,7 @@ module Delayed
|
|
30
30
|
extra[:handler] = job.handler[0...1000] if job.handler
|
31
31
|
|
32
32
|
if job.respond_to?('payload_object') && job.payload_object.respond_to?('job_data')
|
33
|
-
extra[:active_job] = Utils::ContextFilter.filter_context(job.payload_object.job_data)
|
33
|
+
extra[:active_job] = ::Raven::Utils::ContextFilter.filter_context(job.payload_object.job_data)
|
34
34
|
end
|
35
35
|
::Raven.capture_exception(e,
|
36
36
|
:logger => 'delayed_job',
|
@@ -67,8 +67,6 @@ module Raven
|
|
67
67
|
end
|
68
68
|
|
69
69
|
module RackInterface
|
70
|
-
REQUEST_ID_HEADERS = %w(action_dispatch.request_id HTTP_X_REQUEST_ID).freeze
|
71
|
-
|
72
70
|
def from_rack(env_hash)
|
73
71
|
req = ::Rack::Request.new(env_hash)
|
74
72
|
|
@@ -84,15 +82,6 @@ module Raven
|
|
84
82
|
|
85
83
|
private
|
86
84
|
|
87
|
-
# Request ID based on ActionDispatch::RequestId
|
88
|
-
def read_request_id_from(env_hash)
|
89
|
-
REQUEST_ID_HEADERS.each do |key|
|
90
|
-
request_id = env_hash[key]
|
91
|
-
return request_id if request_id
|
92
|
-
end
|
93
|
-
nil
|
94
|
-
end
|
95
|
-
|
96
85
|
# See Sentry server default limits at
|
97
86
|
# https://github.com/getsentry/sentry/blob/master/src/sentry/conf/server.py
|
98
87
|
def read_data_from(request)
|
@@ -111,8 +100,7 @@ module Raven
|
|
111
100
|
env_hash.each_with_object({}) do |(key, value), memo|
|
112
101
|
begin
|
113
102
|
key = key.to_s # rack env can contain symbols
|
114
|
-
|
115
|
-
next memo['X-Request-Id'] ||= read_request_id_from(env_hash) if REQUEST_ID_HEADERS.include?(key)
|
103
|
+
next memo['X-Request-Id'] ||= Utils::RequestId.read_from(env_hash) if Utils::RequestId::REQUEST_ID_HEADERS.include?(key)
|
116
104
|
next unless key.upcase == key # Non-upper case stuff isn't either
|
117
105
|
|
118
106
|
# Rack adds in an incorrect HTTP_VERSION key, which causes downstream
|
@@ -127,7 +115,7 @@ module Raven
|
|
127
115
|
# Rack stores headers as HTTP_WHAT_EVER, we need What-Ever
|
128
116
|
key = key.sub(/^HTTP_/, "")
|
129
117
|
key = key.split('_').map(&:capitalize).join('-')
|
130
|
-
memo[key] = value
|
118
|
+
memo[key] = value.to_s
|
131
119
|
rescue StandardError => e
|
132
120
|
# Rails adds objects to the Rack env that can sometimes raise exceptions
|
133
121
|
# when `to_s` is called.
|
@@ -13,7 +13,8 @@ module Raven
|
|
13
13
|
|
14
14
|
def send_event(auth_header, data, options = {})
|
15
15
|
unless configuration.sending_allowed?
|
16
|
-
logger.debug("Event not sent: #{configuration.error_messages}")
|
16
|
+
configuration.logger.debug("Event not sent: #{configuration.error_messages}")
|
17
|
+
return
|
17
18
|
end
|
18
19
|
|
19
20
|
project_id = configuration[:project_id]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Raven
|
2
|
+
module Utils
|
3
|
+
module RequestId
|
4
|
+
REQUEST_ID_HEADERS = %w(action_dispatch.request_id HTTP_X_REQUEST_ID).freeze
|
5
|
+
|
6
|
+
# Request ID based on ActionDispatch::RequestId
|
7
|
+
def self.read_from(env_hash)
|
8
|
+
REQUEST_ID_HEADERS.each do |key|
|
9
|
+
request_id = env_hash[key]
|
10
|
+
return request_id if request_id
|
11
|
+
end
|
12
|
+
nil
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/raven/version.rb
CHANGED
data/sentry-raven.gemspec
CHANGED
@@ -18,4 +18,11 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.executables = "raven"
|
19
19
|
|
20
20
|
gem.add_dependency "faraday", ">= 1.0"
|
21
|
+
|
22
|
+
gem.post_install_message = <<~EOS
|
23
|
+
`sentry-raven` is deprecated! Please migrate to `sentry-ruby`
|
24
|
+
|
25
|
+
See https://docs.sentry.io/platforms/ruby/migration for the migration guide.
|
26
|
+
|
27
|
+
EOS
|
21
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-raven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -34,19 +34,11 @@ extra_rdoc_files:
|
|
34
34
|
- LICENSE
|
35
35
|
files:
|
36
36
|
- ".craft.yml"
|
37
|
-
- ".
|
38
|
-
- ".github/pull_request_template.md"
|
39
|
-
- ".github/workflows/test.yml"
|
40
|
-
- ".github/workflows/zeus_upload.yml"
|
41
|
-
- ".gitignore"
|
42
|
-
- ".gitmodules"
|
43
|
-
- ".rspec"
|
44
|
-
- ".rubocop.yml"
|
45
|
-
- ".scripts/bump-version.sh"
|
37
|
+
- ".scripts/bump-version.rb"
|
46
38
|
- CHANGELOG.md
|
47
|
-
- CONTRIBUTING.md
|
48
39
|
- Gemfile
|
49
40
|
- LICENSE
|
41
|
+
- Makefile
|
50
42
|
- README.md
|
51
43
|
- Rakefile
|
52
44
|
- exe/raven
|
@@ -106,151 +98,21 @@ files:
|
|
106
98
|
- lib/raven/utils/deep_merge.rb
|
107
99
|
- lib/raven/utils/exception_cause_chain.rb
|
108
100
|
- lib/raven/utils/real_ip.rb
|
101
|
+
- lib/raven/utils/request_id.rb
|
109
102
|
- lib/raven/version.rb
|
110
103
|
- lib/sentry-raven-without-integrations.rb
|
111
104
|
- lib/sentry-raven.rb
|
112
105
|
- lib/sentry_raven_without_integrations.rb
|
113
106
|
- sentry-raven.gemspec
|
114
|
-
- sentry-ruby/.gitignore
|
115
|
-
- sentry-ruby/.rspec
|
116
|
-
- sentry-ruby/.travis.yml
|
117
|
-
- sentry-ruby/CODE_OF_CONDUCT.md
|
118
|
-
- sentry-ruby/Gemfile
|
119
|
-
- sentry-ruby/LICENSE.txt
|
120
|
-
- sentry-ruby/README.md
|
121
|
-
- sentry-ruby/Rakefile
|
122
|
-
- sentry-ruby/bin/console
|
123
|
-
- sentry-ruby/bin/setup
|
124
|
-
- sentry-ruby/examples/rails-6.0/.browserslistrc
|
125
|
-
- sentry-ruby/examples/rails-6.0/.gitignore
|
126
|
-
- sentry-ruby/examples/rails-6.0/Gemfile
|
127
|
-
- sentry-ruby/examples/rails-6.0/README.md
|
128
|
-
- sentry-ruby/examples/rails-6.0/Rakefile
|
129
|
-
- sentry-ruby/examples/rails-6.0/app/assets/config/manifest.js
|
130
|
-
- sentry-ruby/examples/rails-6.0/app/assets/images/.keep
|
131
|
-
- sentry-ruby/examples/rails-6.0/app/assets/stylesheets/application.css
|
132
|
-
- sentry-ruby/examples/rails-6.0/app/channels/application_cable/channel.rb
|
133
|
-
- sentry-ruby/examples/rails-6.0/app/channels/application_cable/connection.rb
|
134
|
-
- sentry-ruby/examples/rails-6.0/app/controllers/application_controller.rb
|
135
|
-
- sentry-ruby/examples/rails-6.0/app/controllers/concerns/.keep
|
136
|
-
- sentry-ruby/examples/rails-6.0/app/controllers/welcome_controller.rb
|
137
|
-
- sentry-ruby/examples/rails-6.0/app/helpers/application_helper.rb
|
138
|
-
- sentry-ruby/examples/rails-6.0/app/javascript/channels/consumer.js
|
139
|
-
- sentry-ruby/examples/rails-6.0/app/javascript/channels/index.js
|
140
|
-
- sentry-ruby/examples/rails-6.0/app/javascript/packs/application.js
|
141
|
-
- sentry-ruby/examples/rails-6.0/app/jobs/application_job.rb
|
142
|
-
- sentry-ruby/examples/rails-6.0/app/mailers/application_mailer.rb
|
143
|
-
- sentry-ruby/examples/rails-6.0/app/models/application_record.rb
|
144
|
-
- sentry-ruby/examples/rails-6.0/app/models/concerns/.keep
|
145
|
-
- sentry-ruby/examples/rails-6.0/app/views/layouts/application.html.erb
|
146
|
-
- sentry-ruby/examples/rails-6.0/app/views/layouts/mailer.html.erb
|
147
|
-
- sentry-ruby/examples/rails-6.0/app/views/layouts/mailer.text.erb
|
148
|
-
- sentry-ruby/examples/rails-6.0/app/views/welcome/report_demo.html.erb
|
149
|
-
- sentry-ruby/examples/rails-6.0/app/views/welcome/view_error.html.erb
|
150
|
-
- sentry-ruby/examples/rails-6.0/app/workers/error_worker.rb
|
151
|
-
- sentry-ruby/examples/rails-6.0/babel.config.js
|
152
|
-
- sentry-ruby/examples/rails-6.0/bin/bundle
|
153
|
-
- sentry-ruby/examples/rails-6.0/bin/rails
|
154
|
-
- sentry-ruby/examples/rails-6.0/bin/rake
|
155
|
-
- sentry-ruby/examples/rails-6.0/bin/setup
|
156
|
-
- sentry-ruby/examples/rails-6.0/bin/spring
|
157
|
-
- sentry-ruby/examples/rails-6.0/bin/webpack
|
158
|
-
- sentry-ruby/examples/rails-6.0/bin/webpack-dev-server
|
159
|
-
- sentry-ruby/examples/rails-6.0/bin/yarn
|
160
|
-
- sentry-ruby/examples/rails-6.0/config.ru
|
161
|
-
- sentry-ruby/examples/rails-6.0/config/application.rb
|
162
|
-
- sentry-ruby/examples/rails-6.0/config/boot.rb
|
163
|
-
- sentry-ruby/examples/rails-6.0/config/cable.yml
|
164
|
-
- sentry-ruby/examples/rails-6.0/config/credentials.yml.enc
|
165
|
-
- sentry-ruby/examples/rails-6.0/config/database.yml
|
166
|
-
- sentry-ruby/examples/rails-6.0/config/environment.rb
|
167
|
-
- sentry-ruby/examples/rails-6.0/config/environments/development.rb
|
168
|
-
- sentry-ruby/examples/rails-6.0/config/environments/production.rb
|
169
|
-
- sentry-ruby/examples/rails-6.0/config/environments/test.rb
|
170
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/application_controller_renderer.rb
|
171
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/assets.rb
|
172
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/backtrace_silencers.rb
|
173
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/content_security_policy.rb
|
174
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/cookies_serializer.rb
|
175
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/filter_parameter_logging.rb
|
176
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/inflections.rb
|
177
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/mime_types.rb
|
178
|
-
- sentry-ruby/examples/rails-6.0/config/initializers/wrap_parameters.rb
|
179
|
-
- sentry-ruby/examples/rails-6.0/config/locales/en.yml
|
180
|
-
- sentry-ruby/examples/rails-6.0/config/puma.rb
|
181
|
-
- sentry-ruby/examples/rails-6.0/config/routes.rb
|
182
|
-
- sentry-ruby/examples/rails-6.0/config/spring.rb
|
183
|
-
- sentry-ruby/examples/rails-6.0/config/storage.yml
|
184
|
-
- sentry-ruby/examples/rails-6.0/config/webpack/development.js
|
185
|
-
- sentry-ruby/examples/rails-6.0/config/webpack/environment.js
|
186
|
-
- sentry-ruby/examples/rails-6.0/config/webpack/production.js
|
187
|
-
- sentry-ruby/examples/rails-6.0/config/webpack/test.js
|
188
|
-
- sentry-ruby/examples/rails-6.0/config/webpacker.yml
|
189
|
-
- sentry-ruby/examples/rails-6.0/db/seeds.rb
|
190
|
-
- sentry-ruby/examples/rails-6.0/lib/assets/.keep
|
191
|
-
- sentry-ruby/examples/rails-6.0/lib/tasks/.keep
|
192
|
-
- sentry-ruby/examples/rails-6.0/package.json
|
193
|
-
- sentry-ruby/examples/rails-6.0/postcss.config.js
|
194
|
-
- sentry-ruby/examples/rails-6.0/public/404.html
|
195
|
-
- sentry-ruby/examples/rails-6.0/public/422.html
|
196
|
-
- sentry-ruby/examples/rails-6.0/public/500.html
|
197
|
-
- sentry-ruby/examples/rails-6.0/public/apple-touch-icon-precomposed.png
|
198
|
-
- sentry-ruby/examples/rails-6.0/public/apple-touch-icon.png
|
199
|
-
- sentry-ruby/examples/rails-6.0/public/favicon.ico
|
200
|
-
- sentry-ruby/examples/rails-6.0/public/robots.txt
|
201
|
-
- sentry-ruby/examples/rails-6.0/storage/.keep
|
202
|
-
- sentry-ruby/examples/rails-6.0/test/application_system_test_case.rb
|
203
|
-
- sentry-ruby/examples/rails-6.0/test/channels/application_cable/connection_test.rb
|
204
|
-
- sentry-ruby/examples/rails-6.0/test/controllers/.keep
|
205
|
-
- sentry-ruby/examples/rails-6.0/test/fixtures/.keep
|
206
|
-
- sentry-ruby/examples/rails-6.0/test/fixtures/files/.keep
|
207
|
-
- sentry-ruby/examples/rails-6.0/test/helpers/.keep
|
208
|
-
- sentry-ruby/examples/rails-6.0/test/integration/.keep
|
209
|
-
- sentry-ruby/examples/rails-6.0/test/mailers/.keep
|
210
|
-
- sentry-ruby/examples/rails-6.0/test/models/.keep
|
211
|
-
- sentry-ruby/examples/rails-6.0/test/system/.keep
|
212
|
-
- sentry-ruby/examples/rails-6.0/test/test_helper.rb
|
213
|
-
- sentry-ruby/examples/rails-6.0/vendor/.keep
|
214
|
-
- sentry-ruby/examples/rails-6.0/yarn.lock
|
215
|
-
- sentry-ruby/lib/sentry.rb
|
216
|
-
- sentry-ruby/lib/sentry/backtrace.rb
|
217
|
-
- sentry-ruby/lib/sentry/client.rb
|
218
|
-
- sentry-ruby/lib/sentry/client/state.rb
|
219
|
-
- sentry-ruby/lib/sentry/configuration.rb
|
220
|
-
- sentry-ruby/lib/sentry/event.rb
|
221
|
-
- sentry-ruby/lib/sentry/interface.rb
|
222
|
-
- sentry-ruby/lib/sentry/interfaces/exception.rb
|
223
|
-
- sentry-ruby/lib/sentry/interfaces/http.rb
|
224
|
-
- sentry-ruby/lib/sentry/interfaces/message.rb
|
225
|
-
- sentry-ruby/lib/sentry/interfaces/single_exception.rb
|
226
|
-
- sentry-ruby/lib/sentry/interfaces/stack_trace.rb
|
227
|
-
- sentry-ruby/lib/sentry/linecache.rb
|
228
|
-
- sentry-ruby/lib/sentry/logger.rb
|
229
|
-
- sentry-ruby/lib/sentry/transports.rb
|
230
|
-
- sentry-ruby/lib/sentry/transports/dummy.rb
|
231
|
-
- sentry-ruby/lib/sentry/transports/http.rb
|
232
|
-
- sentry-ruby/lib/sentry/transports/stdout.rb
|
233
|
-
- sentry-ruby/lib/sentry/utils/deep_merge.rb
|
234
|
-
- sentry-ruby/lib/sentry/utils/exception_cause_chain.rb
|
235
|
-
- sentry-ruby/lib/sentry/version.rb
|
236
|
-
- sentry-ruby/sentry-ruby.gemspec
|
237
|
-
- sentry-ruby/spec/sentry/backtrace_spec.rb
|
238
|
-
- sentry-ruby/spec/sentry/client_spec.rb
|
239
|
-
- sentry-ruby/spec/sentry/configuration_spec.rb
|
240
|
-
- sentry-ruby/spec/sentry/event_spec.rb
|
241
|
-
- sentry-ruby/spec/sentry/interface_spec.rb
|
242
|
-
- sentry-ruby/spec/sentry/interfaces/stack_trace_spec.rb
|
243
|
-
- sentry-ruby/spec/sentry/linecache_spec.rb
|
244
|
-
- sentry-ruby/spec/sentry/transports/http_spec.rb
|
245
|
-
- sentry-ruby/spec/sentry/transports/stdout_spec.rb
|
246
|
-
- sentry-ruby/spec/sentry_spec.rb
|
247
|
-
- sentry-ruby/spec/spec_helper.rb
|
248
|
-
- sentry-ruby/spec/support/linecache.txt
|
249
107
|
homepage: https://github.com/getsentry/raven-ruby
|
250
108
|
licenses:
|
251
109
|
- Apache-2.0
|
252
110
|
metadata: {}
|
253
|
-
post_install_message:
|
111
|
+
post_install_message: |+
|
112
|
+
`sentry-raven` is deprecated! Please migrate to `sentry-ruby`
|
113
|
+
|
114
|
+
See https://docs.sentry.io/platforms/ruby/migration for the migration guide.
|
115
|
+
|
254
116
|
rdoc_options: []
|
255
117
|
require_paths:
|
256
118
|
- lib
|