sentry-raven 2.12.3 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.craft.yml +15 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- data/.github/pull_request_template.md +16 -0
- data/.github/workflows/test.yml +92 -0
- data/.github/workflows/zeus_upload.yml +32 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +50 -12
- data/.scripts/bump-version.sh +9 -0
- data/{changelog.md → CHANGELOG.md} +180 -2
- data/CONTRIBUTING.md +71 -0
- data/Gemfile +20 -25
- data/README.md +32 -16
- data/lib/raven/backtrace.rb +9 -5
- data/lib/raven/base.rb +6 -2
- data/lib/raven/breadcrumbs.rb +1 -1
- data/lib/raven/breadcrumbs/{activesupport.rb → active_support_logger.rb} +9 -3
- data/lib/raven/breadcrumbs/logger.rb +2 -92
- data/lib/raven/breadcrumbs/sentry_logger.rb +73 -0
- data/lib/raven/cli.rb +10 -21
- data/lib/raven/client.rb +12 -6
- data/lib/raven/configuration.rb +96 -10
- data/lib/raven/context.rb +13 -8
- data/lib/raven/core_ext/object/deep_dup.rb +57 -0
- data/lib/raven/core_ext/object/duplicable.rb +153 -0
- data/lib/raven/event.rb +28 -19
- data/lib/raven/helpers/deprecation_helper.rb +17 -0
- data/lib/raven/instance.rb +14 -4
- data/lib/raven/integrations/delayed_job.rb +16 -16
- data/lib/raven/integrations/rack-timeout.rb +7 -4
- data/lib/raven/integrations/rack.rb +19 -5
- data/lib/raven/integrations/rails.rb +13 -3
- data/lib/raven/integrations/rails/active_job.rb +11 -7
- data/lib/raven/integrations/rails/backtrace_cleaner.rb +29 -0
- data/lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb +2 -2
- data/lib/raven/integrations/sidekiq.rb +4 -78
- data/lib/raven/integrations/sidekiq/cleanup_middleware.rb +13 -0
- data/lib/raven/integrations/sidekiq/error_handler.rb +38 -0
- data/lib/raven/interface.rb +2 -2
- data/lib/raven/interfaces/stack_trace.rb +1 -1
- data/lib/raven/linecache.rb +5 -2
- data/lib/raven/logger.rb +3 -2
- data/lib/raven/processor/cookies.rb +16 -6
- data/lib/raven/processor/post_data.rb +2 -0
- data/lib/raven/processor/removecircularreferences.rb +3 -1
- data/lib/raven/processor/sanitizedata.rb +65 -17
- data/lib/raven/processor/utf8conversion.rb +2 -0
- data/lib/raven/transports.rb +4 -0
- data/lib/raven/transports/http.rb +5 -7
- data/lib/raven/utils/context_filter.rb +42 -0
- data/lib/raven/utils/exception_cause_chain.rb +1 -0
- data/lib/raven/utils/real_ip.rb +1 -1
- data/lib/raven/version.rb +2 -2
- data/lib/sentry-raven-without-integrations.rb +6 -1
- data/lib/sentry_raven_without_integrations.rb +1 -0
- data/sentry-raven.gemspec +2 -2
- data/sentry-ruby/.gitignore +11 -0
- data/sentry-ruby/.rspec +3 -0
- data/sentry-ruby/.travis.yml +6 -0
- data/sentry-ruby/CODE_OF_CONDUCT.md +74 -0
- data/sentry-ruby/Gemfile +9 -0
- data/sentry-ruby/LICENSE.txt +21 -0
- data/sentry-ruby/README.md +44 -0
- data/sentry-ruby/Rakefile +6 -0
- data/sentry-ruby/bin/console +14 -0
- data/sentry-ruby/bin/setup +8 -0
- data/sentry-ruby/examples/rails-6.0/.browserslistrc +1 -0
- data/sentry-ruby/examples/rails-6.0/.gitignore +35 -0
- data/sentry-ruby/examples/rails-6.0/Gemfile +58 -0
- data/sentry-ruby/examples/rails-6.0/README.md +23 -0
- data/sentry-ruby/examples/rails-6.0/Rakefile +6 -0
- data/sentry-ruby/examples/rails-6.0/app/assets/config/manifest.js +2 -0
- 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 +15 -0
- data/sentry-ruby/examples/rails-6.0/app/channels/application_cable/channel.rb +4 -0
- data/sentry-ruby/examples/rails-6.0/app/channels/application_cable/connection.rb +4 -0
- data/sentry-ruby/examples/rails-6.0/app/controllers/application_controller.rb +2 -0
- 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 +23 -0
- data/sentry-ruby/examples/rails-6.0/app/helpers/application_helper.rb +2 -0
- data/sentry-ruby/examples/rails-6.0/app/javascript/channels/consumer.js +6 -0
- data/sentry-ruby/examples/rails-6.0/app/javascript/channels/index.js +5 -0
- data/sentry-ruby/examples/rails-6.0/app/javascript/packs/application.js +17 -0
- data/sentry-ruby/examples/rails-6.0/app/jobs/application_job.rb +7 -0
- data/sentry-ruby/examples/rails-6.0/app/mailers/application_mailer.rb +4 -0
- data/sentry-ruby/examples/rails-6.0/app/models/application_record.rb +3 -0
- 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 +15 -0
- data/sentry-ruby/examples/rails-6.0/app/views/layouts/mailer.html.erb +13 -0
- data/sentry-ruby/examples/rails-6.0/app/views/layouts/mailer.text.erb +1 -0
- data/sentry-ruby/examples/rails-6.0/app/views/welcome/report_demo.html.erb +22 -0
- data/sentry-ruby/examples/rails-6.0/app/views/welcome/view_error.html.erb +1 -0
- data/sentry-ruby/examples/rails-6.0/app/workers/error_worker.rb +7 -0
- data/sentry-ruby/examples/rails-6.0/babel.config.js +72 -0
- data/sentry-ruby/examples/rails-6.0/bin/bundle +114 -0
- data/sentry-ruby/examples/rails-6.0/bin/rails +9 -0
- data/sentry-ruby/examples/rails-6.0/bin/rake +9 -0
- data/sentry-ruby/examples/rails-6.0/bin/setup +36 -0
- data/sentry-ruby/examples/rails-6.0/bin/spring +17 -0
- data/sentry-ruby/examples/rails-6.0/bin/webpack +18 -0
- data/sentry-ruby/examples/rails-6.0/bin/webpack-dev-server +18 -0
- data/sentry-ruby/examples/rails-6.0/bin/yarn +11 -0
- data/sentry-ruby/examples/rails-6.0/config.ru +5 -0
- data/sentry-ruby/examples/rails-6.0/config/application.rb +28 -0
- data/sentry-ruby/examples/rails-6.0/config/boot.rb +4 -0
- data/sentry-ruby/examples/rails-6.0/config/cable.yml +10 -0
- data/sentry-ruby/examples/rails-6.0/config/credentials.yml.enc +1 -0
- data/sentry-ruby/examples/rails-6.0/config/database.yml +25 -0
- data/sentry-ruby/examples/rails-6.0/config/environment.rb +5 -0
- data/sentry-ruby/examples/rails-6.0/config/environments/development.rb +62 -0
- data/sentry-ruby/examples/rails-6.0/config/environments/production.rb +112 -0
- data/sentry-ruby/examples/rails-6.0/config/environments/test.rb +48 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/application_controller_renderer.rb +8 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/assets.rb +14 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/backtrace_silencers.rb +7 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/content_security_policy.rb +30 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/cookies_serializer.rb +5 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/filter_parameter_logging.rb +4 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/inflections.rb +16 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/mime_types.rb +4 -0
- data/sentry-ruby/examples/rails-6.0/config/initializers/wrap_parameters.rb +14 -0
- data/sentry-ruby/examples/rails-6.0/config/locales/en.yml +33 -0
- data/sentry-ruby/examples/rails-6.0/config/puma.rb +38 -0
- data/sentry-ruby/examples/rails-6.0/config/routes.rb +10 -0
- data/sentry-ruby/examples/rails-6.0/config/spring.rb +6 -0
- data/sentry-ruby/examples/rails-6.0/config/storage.yml +34 -0
- data/sentry-ruby/examples/rails-6.0/config/webpack/development.js +5 -0
- data/sentry-ruby/examples/rails-6.0/config/webpack/environment.js +3 -0
- data/sentry-ruby/examples/rails-6.0/config/webpack/production.js +5 -0
- data/sentry-ruby/examples/rails-6.0/config/webpack/test.js +5 -0
- data/sentry-ruby/examples/rails-6.0/config/webpacker.yml +96 -0
- data/sentry-ruby/examples/rails-6.0/db/seeds.rb +7 -0
- 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 +15 -0
- data/sentry-ruby/examples/rails-6.0/postcss.config.js +12 -0
- data/sentry-ruby/examples/rails-6.0/public/404.html +67 -0
- data/sentry-ruby/examples/rails-6.0/public/422.html +67 -0
- data/sentry-ruby/examples/rails-6.0/public/500.html +66 -0
- 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 +1 -0
- data/sentry-ruby/examples/rails-6.0/storage/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/test/application_system_test_case.rb +5 -0
- data/sentry-ruby/examples/rails-6.0/test/channels/application_cable/connection_test.rb +11 -0
- 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 +13 -0
- data/sentry-ruby/examples/rails-6.0/vendor/.keep +0 -0
- data/sentry-ruby/examples/rails-6.0/yarn.lock +7508 -0
- data/sentry-ruby/lib/sentry.rb +16 -0
- data/sentry-ruby/lib/sentry/backtrace.rb +128 -0
- data/sentry-ruby/lib/sentry/client.rb +162 -0
- data/sentry-ruby/lib/sentry/client/state.rb +40 -0
- data/sentry-ruby/lib/sentry/configuration.rb +533 -0
- data/sentry-ruby/lib/sentry/event.rb +209 -0
- data/sentry-ruby/lib/sentry/interface.rb +31 -0
- data/sentry-ruby/lib/sentry/interfaces/exception.rb +15 -0
- data/sentry-ruby/lib/sentry/interfaces/http.rb +16 -0
- data/sentry-ruby/lib/sentry/interfaces/message.rb +18 -0
- data/sentry-ruby/lib/sentry/interfaces/single_exception.rb +14 -0
- data/sentry-ruby/lib/sentry/interfaces/stack_trace.rb +69 -0
- data/sentry-ruby/lib/sentry/linecache.rb +44 -0
- data/sentry-ruby/lib/sentry/logger.rb +20 -0
- data/sentry-ruby/lib/sentry/transports.rb +19 -0
- data/sentry-ruby/lib/sentry/transports/dummy.rb +16 -0
- data/sentry-ruby/lib/sentry/transports/http.rb +66 -0
- data/sentry-ruby/lib/sentry/transports/stdout.rb +20 -0
- data/sentry-ruby/lib/sentry/utils/deep_merge.rb +22 -0
- data/sentry-ruby/lib/sentry/utils/exception_cause_chain.rb +20 -0
- data/sentry-ruby/lib/sentry/version.rb +3 -0
- data/sentry-ruby/sentry-ruby.gemspec +26 -0
- data/sentry-ruby/spec/sentry/backtrace_spec.rb +38 -0
- data/sentry-ruby/spec/sentry/client_spec.rb +443 -0
- data/sentry-ruby/spec/sentry/configuration_spec.rb +400 -0
- data/sentry-ruby/spec/sentry/event_spec.rb +238 -0
- data/sentry-ruby/spec/sentry/interface_spec.rb +38 -0
- data/sentry-ruby/spec/sentry/interfaces/stack_trace_spec.rb +11 -0
- data/sentry-ruby/spec/sentry/linecache_spec.rb +40 -0
- data/sentry-ruby/spec/sentry/transports/http_spec.rb +57 -0
- data/sentry-ruby/spec/sentry/transports/stdout_spec.rb +11 -0
- data/sentry-ruby/spec/sentry_spec.rb +9 -0
- data/sentry-ruby/spec/spec_helper.rb +49 -0
- data/sentry-ruby/spec/support/linecache.txt +6 -0
- metadata +157 -14
- data/.travis.yml +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9409fd1db13a8eec36f00e801c3391b84739dc6166123e5397494b85766149ec
|
4
|
+
data.tar.gz: 3a9eb01cfdf1922ec4e8b1a5553a31d224a7df39fc6a37ddbed9277e4b3d72ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46c863f1960b12c97a03a91edda72dd4ec16d04da2e6890a80bd736b092b11e44e74822c6497219883f7ed1c5c135e7b789b36da299fcba389f2accdefb83b97
|
7
|
+
data.tar.gz: 560dad6f93a0fbd345100b4c4de7e578dedb874a8fab63a8168f629b53d13938276cf4f10db6e2dd357ffc8fa04dc91a87dac6185bcd7e5e3585bbf98ef09e5c
|
data/.craft.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
minVersion: '0.11.0'
|
2
|
+
github:
|
3
|
+
owner: getsentry
|
4
|
+
repo: raven-ruby
|
5
|
+
changelogPolicy: simple
|
6
|
+
preReleaseCommand: ruby .scripts/bump-version.sh
|
7
|
+
statusProvider:
|
8
|
+
name: github
|
9
|
+
targets:
|
10
|
+
- name: gem
|
11
|
+
- name: github
|
12
|
+
- name: registry
|
13
|
+
type: sdk
|
14
|
+
config:
|
15
|
+
canonical: 'gem:sentry-raven'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: bug
|
6
|
+
assignees: st0012
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
|
12
|
+
**To Reproduce**
|
13
|
+
|
14
|
+
**Expected behavior**
|
15
|
+
|
16
|
+
**Actual behavior**
|
17
|
+
|
18
|
+
**Environment**
|
19
|
+
- Ruby Version:
|
20
|
+
- SDK Version:
|
21
|
+
- Integration Versions (if any):
|
22
|
+
- e.g. Rails 6.0, Sidekiq 6.1.2
|
23
|
+
|
24
|
+
**Raven Config**
|
25
|
+
|
26
|
+
This is not necessary but could be helpful.
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
Raven.configure do |config|
|
30
|
+
# the config you're using, without DSN and other sensitive data
|
31
|
+
end
|
32
|
+
```
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Thanks for your Pull Request 🎉
|
2
|
+
|
3
|
+
**Please keep these instructions in mind so we can review it more efficiently:**
|
4
|
+
|
5
|
+
- Add the references of all the related issues/PRs in the description
|
6
|
+
- Whether it's a new feature or a bug fix, make sure they're covered by new test cases
|
7
|
+
- If this PR contains any refactoring work, please give it its own commit(s)
|
8
|
+
|
9
|
+
|
10
|
+
**Other Notes**
|
11
|
+
- We squash all commits before merging
|
12
|
+
- We generally review new PRs within a week
|
13
|
+
- If you have any question, you can ask for feedback in our [discord community](https://discord.gg/Ww9hbqr) first
|
14
|
+
|
15
|
+
## Description
|
16
|
+
Describe your changes:
|
@@ -0,0 +1,92 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
name: Test on ruby ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }}
|
11
|
+
runs-on: ${{ matrix.os }}
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
rails_version: [0, 4.2, 5.2, 6.0]
|
15
|
+
ruby_version: [2.3, 2.4, 2.5, 2.6, 2.7, jruby, head]
|
16
|
+
os: [ubuntu-latest]
|
17
|
+
include:
|
18
|
+
- ruby_version: head
|
19
|
+
rails_version: 0
|
20
|
+
- ruby_version: 2.7
|
21
|
+
rails_version: 6.0
|
22
|
+
env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
|
23
|
+
exclude:
|
24
|
+
- ruby_version: 2.3
|
25
|
+
rails_version: 6.0
|
26
|
+
- ruby_version: 2.4
|
27
|
+
rails_version: 6.0
|
28
|
+
- ruby_version: 2.7
|
29
|
+
rails_version: 4.2
|
30
|
+
- ruby_version: head
|
31
|
+
rails_version: 4.2
|
32
|
+
- ruby_version: head
|
33
|
+
rails_version: 5.2
|
34
|
+
- ruby_version: head
|
35
|
+
rails_version: 6.0
|
36
|
+
|
37
|
+
steps:
|
38
|
+
- uses: actions/checkout@v1
|
39
|
+
|
40
|
+
- name: Set up Ruby ${{ matrix.ruby_version }}
|
41
|
+
uses: ruby/setup-ruby@v1
|
42
|
+
with:
|
43
|
+
bundler: 1
|
44
|
+
ruby-version: ${{ matrix.ruby_version }}
|
45
|
+
|
46
|
+
- name: Start Redis
|
47
|
+
uses: supercharge/redis-github-action@1.1.0
|
48
|
+
with:
|
49
|
+
redis-version: 5
|
50
|
+
|
51
|
+
- name: Build with Rails ${{ matrix.rails_version }}
|
52
|
+
env:
|
53
|
+
RAILS_VERSION: ${{ matrix.rails_version }}
|
54
|
+
run: |
|
55
|
+
bundle install --jobs 4 --retry 3
|
56
|
+
bundle exec rake
|
57
|
+
|
58
|
+
compare_allocation:
|
59
|
+
name: Compare memory allocation with ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }}
|
60
|
+
runs-on: ${{ matrix.os }}
|
61
|
+
needs: test
|
62
|
+
env:
|
63
|
+
RAILS_VERSION: ${{ matrix.rails_version }}
|
64
|
+
strategy:
|
65
|
+
matrix:
|
66
|
+
rails_version: [5.2, 6.0]
|
67
|
+
ruby_version: [2.6, 2.7]
|
68
|
+
os: [ubuntu-latest]
|
69
|
+
steps:
|
70
|
+
- name: Set up Ruby ${{ matrix.ruby_version }}
|
71
|
+
uses: ruby/setup-ruby@v1
|
72
|
+
with:
|
73
|
+
bundler: 1
|
74
|
+
ruby-version: ${{ matrix.ruby_version }}
|
75
|
+
|
76
|
+
- uses: actions/checkout@v2
|
77
|
+
with:
|
78
|
+
ref: master
|
79
|
+
|
80
|
+
- name: Build and run allocation report on master
|
81
|
+
run: |
|
82
|
+
bundle install --jobs 4 --retry 3
|
83
|
+
bundle exec ruby benchmarks/allocation_comparison.rb
|
84
|
+
|
85
|
+
- uses: actions/checkout@v1
|
86
|
+
|
87
|
+
- name: Rebuild on the branch
|
88
|
+
run: |
|
89
|
+
bundle install --jobs 4 --retry 3
|
90
|
+
- name: Run allocation report on the branch
|
91
|
+
run: |
|
92
|
+
bundle exec ruby benchmarks/allocation_comparison.rb
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Zeus Upload
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- release/**
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
zeus_upload:
|
10
|
+
name: Zeus
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: actions/setup-node@v1
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: 2.6 # Not needed with a .ruby-version file
|
19
|
+
- run: bundle install
|
20
|
+
- name: Install Zeus
|
21
|
+
run: |
|
22
|
+
yarn global add @zeus-ci/cli
|
23
|
+
echo "::add-path::$(yarn global bin)"
|
24
|
+
- name: Upload to Zeus
|
25
|
+
env:
|
26
|
+
ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
|
27
|
+
ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }}
|
28
|
+
run: |
|
29
|
+
zeus job update -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -r $GITHUB_SHA
|
30
|
+
gem build sentry-raven.gemspec
|
31
|
+
zeus upload -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -t "application/tar+gem" ./*.gem
|
32
|
+
zeus job update --status=passed -b $GITHUB_RUN_ID -j $GITHUB_RUN_NUMBER -r $GITHUB_SHA
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -7,42 +7,57 @@ AllCops:
|
|
7
7
|
- 'vendor/**/*'
|
8
8
|
|
9
9
|
Metrics/ClassLength:
|
10
|
-
Max:
|
10
|
+
Max: 350
|
11
11
|
CountComments: false
|
12
12
|
|
13
13
|
Metrics/AbcSize:
|
14
14
|
Max: 40
|
15
15
|
|
16
|
+
Metrics/BlockLength:
|
17
|
+
Enabled: false
|
18
|
+
|
16
19
|
Metrics/CyclomaticComplexity:
|
17
20
|
Max: 12
|
18
21
|
|
19
22
|
Metrics/PerceivedComplexity:
|
20
23
|
Max: 11
|
21
24
|
|
22
|
-
Metrics/LineLength:
|
23
|
-
Max: 155
|
24
|
-
|
25
25
|
Metrics/MethodLength:
|
26
|
-
Max:
|
26
|
+
Max: 40
|
27
27
|
|
28
|
-
Style/
|
28
|
+
Style/SymbolArray:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Style/PercentLiteralDelimiters:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/FrozenStringLiteralComment:
|
29
35
|
Enabled: false
|
30
36
|
|
31
|
-
|
37
|
+
Style/SignalException:
|
32
38
|
Enabled: false
|
33
39
|
|
34
40
|
Style/ClassAndModuleChildren:
|
35
41
|
Enabled: false
|
36
42
|
|
43
|
+
Style/RescueStandardError:
|
44
|
+
Enabled: false
|
45
|
+
|
37
46
|
Style/ParallelAssignment:
|
38
47
|
Enabled: false
|
39
48
|
|
40
49
|
Style/Documentation:
|
41
50
|
Enabled: false
|
42
51
|
|
52
|
+
Style/CommentedKeyword:
|
53
|
+
Enabled: false
|
54
|
+
|
43
55
|
Style/RescueModifier:
|
44
56
|
Enabled: false
|
45
57
|
|
58
|
+
Style/RegexpLiteral:
|
59
|
+
Enabled: false
|
60
|
+
|
46
61
|
Style/StringLiterals:
|
47
62
|
Enabled: false
|
48
63
|
|
@@ -52,17 +67,21 @@ Style/CaseEquality:
|
|
52
67
|
Style/DoubleNegation:
|
53
68
|
Enabled: false
|
54
69
|
|
55
|
-
Style/
|
56
|
-
|
57
|
-
|
58
|
-
|
70
|
+
Style/GuardClause:
|
71
|
+
Enabled: false
|
72
|
+
|
73
|
+
Style/RedundantBegin:
|
74
|
+
Enabled: false
|
59
75
|
|
60
76
|
Style/NumericLiterals:
|
61
77
|
Exclude:
|
62
78
|
- 'spec/raven/processors/sanitizedata_processor_spec.rb'
|
63
79
|
|
64
80
|
Style/HashSyntax:
|
65
|
-
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
Style/IfUnlessModifier:
|
84
|
+
Enabled: false
|
66
85
|
|
67
86
|
Lint/RescueException:
|
68
87
|
Exclude:
|
@@ -72,3 +91,22 @@ Lint/RescueException:
|
|
72
91
|
- 'lib/raven/integrations/rack.rb'
|
73
92
|
- 'lib/raven/integrations/sidekiq.rb'
|
74
93
|
- 'spec/raven/event_spec.rb'
|
94
|
+
|
95
|
+
Lint/SuppressedException:
|
96
|
+
Enabled: false
|
97
|
+
|
98
|
+
Lint/AssignmentInCondition:
|
99
|
+
Enabled: false
|
100
|
+
|
101
|
+
Layout/LineLength:
|
102
|
+
Max: 155
|
103
|
+
|
104
|
+
Naming/FileName:
|
105
|
+
Exclude:
|
106
|
+
- 'lib/sentry-raven-without-integrations.rb'
|
107
|
+
- 'lib/sentry-raven.rb'
|
108
|
+
- 'lib/raven/integrations/rack-timeout.rb'
|
109
|
+
|
110
|
+
Naming/MethodParameterName:
|
111
|
+
Enabled: false
|
112
|
+
|
@@ -1,7 +1,185 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 3.1.1
|
4
|
+
|
5
|
+
**Feature**
|
6
|
+
|
7
|
+
- Add request id to headers if exists ([#1033](https://github.com/getsentry/sentry-ruby/pull/1033))
|
8
|
+
|
9
|
+
- Allow blocks on user_context ([#1023](https://github.com/getsentry/sentry-ruby/pull/1023))
|
10
|
+
|
11
|
+
- Enable configurable rack environment recorded parameters ([#860](https://github.com/getsentry/sentry-ruby/pull/860))
|
12
|
+
|
13
|
+
- Remove ActiveJob keys for both Sidekiq and DelayedJob ([#898](https://github.com/getsentry/sentry-ruby/pull/898))
|
14
|
+
|
15
|
+
**Fix**
|
16
|
+
|
17
|
+
- Remove circular dependency in transport/http.rb ([#1035](https://github.com/getsentry/sentry-ruby/pull/1035))
|
18
|
+
|
19
|
+
## 3.1.0
|
20
|
+
|
21
|
+
**Feature**
|
22
|
+
|
23
|
+
- Exclude all 4xx Rails errors ([#1004](https://github.com/getsentry/raven-ruby/pull/1004))
|
24
|
+
|
25
|
+
See the full list [here](https://github.com/getsentry/raven-ruby/blob/master/lib/raven/configuration.rb#L198-L219)
|
26
|
+
|
27
|
+
- Add some error context in `transport_failure_callback` ([#1003](https://github.com/getsentry/raven-ruby/pull/1003))
|
28
|
+
|
29
|
+
Before:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
config.transport_failure_callback = lambda { |event|
|
33
|
+
AdminMailer.email_admins("Oh god, it's on fire!", event).deliver_later
|
34
|
+
}
|
35
|
+
```
|
36
|
+
|
37
|
+
After:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
config.transport_failure_callback = lambda { |event, error|
|
41
|
+
AdminMailer.email_admins("Oh god, it's on fire because #{error.message}!", event).deliver_later
|
42
|
+
}
|
43
|
+
```
|
44
|
+
|
45
|
+
- Support cleaning up exception backtrace with customized backtrace_cleaner ([#1011](https://github.com/getsentry/raven-ruby/pull/1011))
|
46
|
+
|
47
|
+
The new config `backtrace_cleanup_callback` takes a lambda/proc object (default is `nil`) and will be called with exception's backtrace
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
Raven.configure do |config|
|
51
|
+
config.backtrace_cleanup_callback = lambda do |backtrace|
|
52
|
+
Rails.backtrace_cleaner.clean(backtrace)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
And with the Rails integration, it'll automatically use a customized `Raven::Rails::BacktraceCleaner` to clean up exception's backtrace. It's basically Rails 6's [backtrace cleaner](https://github.com/rails/rails/blob/master/railties/lib/rails/backtrace_cleaner.rb) but without silencers.
|
58
|
+
|
59
|
+
The main reason to add this cleaner is to remove template methods from the trace, e.g.
|
60
|
+
|
61
|
+
```
|
62
|
+
app/views/welcome/view_error.html.erb in _app_views_welcome_view_error_html_erb__2807287320172182514_65600 at line 1
|
63
|
+
```
|
64
|
+
|
65
|
+
will become
|
66
|
+
|
67
|
+
```
|
68
|
+
app/views/welcome/view_error.html.erb at line 1
|
69
|
+
```
|
70
|
+
|
71
|
+
This can help Sentry group issues more accurately. See [#957](https://github.com/getsentry/raven-ruby/issues/957) for more information about this.
|
72
|
+
|
73
|
+
If you don't want this change, you can disable it with:
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
Raven.configure do |config|
|
77
|
+
config.backtrace_cleanup_callback = nil
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
81
|
+
|
82
|
+
- Make dsn value accessable from config ([#1012](https://github.com/getsentry/raven-ruby/pull/1012))
|
83
|
+
|
84
|
+
You can now access the dsn value via `Raven.configuration.dsn`
|
85
|
+
|
86
|
+
**Deprecation**
|
87
|
+
|
88
|
+
- Deprecate dasherized filenames ([#1006](https://github.com/getsentry/raven-ruby/pull/1006))
|
89
|
+
|
90
|
+
If you're using
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
gem 'sentry-raven', require: 'sentry-raven-without-integrations'
|
94
|
+
# or
|
95
|
+
require "sentry-raven-without-integrations"
|
96
|
+
```
|
97
|
+
|
98
|
+
you will start seeing deprecation warnings. Please change them into
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
gem 'sentry-raven', require: 'sentry_raven_without_integrations'
|
102
|
+
# or
|
103
|
+
require "sentry_raven_without_integrations"
|
104
|
+
```
|
105
|
+
|
106
|
+
- Unify breadcrumb loggers activation ([#1016](https://github.com/getsentry/raven-ruby/pull/1016))
|
107
|
+
|
108
|
+
Currently, we activate our breadcrumb loggers differently:
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
require "raven/breadcrumbs/sentry_logger"
|
112
|
+
Raven.configuration.rails_activesupport_breadcrumbs = true
|
113
|
+
```
|
114
|
+
|
115
|
+
It's not a nice user interface, so this PR adds a new configuration
|
116
|
+
option `breadcrumbs_logger` to improve this:
|
117
|
+
|
118
|
+
```ruby
|
119
|
+
Raven.configuration.breadcrumbs_logger = :sentry_logger
|
120
|
+
Raven.configuration.breadcrumbs_logger = :active_support_logger
|
121
|
+
Raven.configuration.breadcrumbs_logger = [:sentry_logger, :active_support_logger]
|
122
|
+
```
|
123
|
+
|
124
|
+
Please migrate to the new activation apporach, otherwise you'll see depraction warnings. And old ones will be dropped in version 4.0.
|
125
|
+
|
126
|
+
**Refactor**
|
127
|
+
|
128
|
+
- Accept non-string message in Event.from_exception ([#1005](https://github.com/getsentry/raven-ruby/pull/1005))
|
129
|
+
- Refactor event initialization ([#1010](https://github.com/getsentry/raven-ruby/pull/1010))
|
130
|
+
- Refactor sidekiq integration ([#1019](https://github.com/getsentry/raven-ruby/pull/1019))
|
131
|
+
|
132
|
+
**Fix**
|
133
|
+
|
134
|
+
- Replace sys_command usages in context.rb ([#1017](https://github.com/getsentry/raven-ruby/pull/1017))
|
135
|
+
- Fix merge error from rack-timeout raven_context on old releases ([#1007](https://github.com/getsentry/raven-ruby/pull/1007))
|
136
|
+
- Return value of `rescue_with_handler` when intercepting ActiveJob exceptions ([#1027](https://github.com/getsentry/raven-ruby/pull/1027))
|
137
|
+
|
138
|
+
## 3.0.4
|
139
|
+
|
140
|
+
- fix: Don't log warning messages when it doesn't need to (#1000)
|
141
|
+
- fix: Revert "Refactor Raven::Client class" (#1002)
|
142
|
+
|
143
|
+
## 3.0.3
|
144
|
+
|
145
|
+
- fix: Ensure Processor::Cookie can run after Processor::RemoveCircularReferences (#996)
|
146
|
+
- fix: Avoid mutating user passed in options (#994)
|
147
|
+
- fix: Fix/Refactor Raven::Cli (#989)
|
148
|
+
- ref: Refactor Raven::Client class (#995)
|
149
|
+
- It adds `Event#message_from_exception` and `Event#log_message` interfaces
|
150
|
+
|
151
|
+
## 3.0.2
|
152
|
+
|
153
|
+
- fix: Add gem target for craft
|
154
|
+
|
155
|
+
## 3.0.1
|
156
|
+
|
157
|
+
- fix: Improve SanitizeData processor (#984)
|
158
|
+
- fix: Masking cookies as key/pair instead of a single string (#983)
|
159
|
+
- fix: Transports classes' requiring issue (#986)
|
160
|
+
- fix: Frozen string issues (#977)
|
161
|
+
- feat: Officially support Rails 6 (#982)
|
162
|
+
|
163
|
+
3.0.0
|
164
|
+
----
|
165
|
+
|
166
|
+
* SDK now requires Ruby >= 2.3
|
167
|
+
* REF: Retain any literal "HTTP-" in header names [@elliterate, #950]
|
168
|
+
* REF: Delete JSON spec for recursive hashes [@ksylvest, #952]
|
169
|
+
* FEAT: Bump faraday version to latest [@ksylvest, #946]
|
170
|
+
|
171
|
+
2.13.0
|
172
|
+
----
|
173
|
+
|
174
|
+
* FIX: Sanitize event data before they are sent to async job. [@edariedl, #895]
|
175
|
+
* FIX: Serialization MongoDB ObjectId to JSON problem with gem delayed_job_mongoid conjunction. [@eagleas, #935]
|
176
|
+
* FEAT: Skip ActiveJob integration if there is a better one [@fsateler, #909]
|
177
|
+
* FIX: Bugs with send_event in asynchronous mode (#940) [@cstyles, #940]
|
178
|
+
|
1
179
|
2.12.3
|
2
180
|
----
|
3
181
|
|
4
|
-
*FIX: crash when Process.wait is used [@asBrettisay, #895]
|
182
|
+
* FIX: crash when Process.wait is used [@asBrettisay, #895]
|
5
183
|
|
6
184
|
2.12.2
|
7
185
|
----
|
@@ -467,7 +645,7 @@ OTHER CHANGES:
|
|
467
645
|
0.12.0
|
468
646
|
------
|
469
647
|
|
470
|
-
- You can now give additional fields to the SanitizeData processor. Values matched are replaced by the string mask (*********). Full documentation (and how to use with Rails config.filter_parameters) [here](https://docs.
|
648
|
+
- You can now give additional fields to the SanitizeData processor. Values matched are replaced by the string mask (*********). Full documentation (and how to use with Rails config.filter_parameters) [here](https://docs.sentry.io/platforms/ruby/config/). [jamescway, #232]
|
471
649
|
- An additional processor has been added, though it isn't turned on by default: RemoveStacktrace. Use it to remove stacktraces from exception reports. [nateberkopec, #233]
|
472
650
|
- Dependency on `uuidtools` has been removed. [nateberkopec, #231]
|
473
651
|
|