sentry-raven 2.13.0 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.craft.yml +15 -0
  3. data/.github/workflows/test.yml +87 -0
  4. data/.github/workflows/zeus_upload.yml +32 -0
  5. data/.gitignore +2 -0
  6. data/.rubocop.yml +44 -9
  7. data/.scripts/bump-version.sh +9 -0
  8. data/{changelog.md → CHANGELOG.md} +38 -1
  9. data/CONTRIUTING.md +26 -0
  10. data/Gemfile +20 -25
  11. data/README.md +24 -14
  12. data/lib/raven/backtrace.rb +7 -5
  13. data/lib/raven/base.rb +5 -2
  14. data/lib/raven/breadcrumbs.rb +1 -1
  15. data/lib/raven/breadcrumbs/activesupport.rb +10 -10
  16. data/lib/raven/breadcrumbs/logger.rb +3 -3
  17. data/lib/raven/cli.rb +9 -20
  18. data/lib/raven/client.rb +9 -4
  19. data/lib/raven/configuration.rb +20 -6
  20. data/lib/raven/core_ext/object/deep_dup.rb +57 -0
  21. data/lib/raven/core_ext/object/duplicable.rb +153 -0
  22. data/lib/raven/event.rb +4 -2
  23. data/lib/raven/instance.rb +6 -3
  24. data/lib/raven/integrations/delayed_job.rb +13 -14
  25. data/lib/raven/integrations/rack-timeout.rb +2 -3
  26. data/lib/raven/integrations/rack.rb +4 -3
  27. data/lib/raven/integrations/rails.rb +1 -0
  28. data/lib/raven/integrations/rails/active_job.rb +5 -4
  29. data/lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb +2 -2
  30. data/lib/raven/interface.rb +2 -2
  31. data/lib/raven/interfaces/stack_trace.rb +1 -1
  32. data/lib/raven/linecache.rb +5 -2
  33. data/lib/raven/logger.rb +3 -2
  34. data/lib/raven/processor/cookies.rb +16 -6
  35. data/lib/raven/processor/post_data.rb +2 -0
  36. data/lib/raven/processor/removecircularreferences.rb +3 -1
  37. data/lib/raven/processor/sanitizedata.rb +65 -17
  38. data/lib/raven/processor/utf8conversion.rb +2 -0
  39. data/lib/raven/transports.rb +4 -0
  40. data/lib/raven/transports/http.rb +5 -5
  41. data/lib/raven/utils/exception_cause_chain.rb +1 -0
  42. data/lib/raven/utils/real_ip.rb +1 -1
  43. data/lib/raven/version.rb +2 -2
  44. data/sentry-raven.gemspec +2 -2
  45. metadata +11 -11
  46. data/.travis.yml +0 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 478a0cd677f1508fc2153381addf6956e189c5f9491ede8f79b6097977dd59b9
4
- data.tar.gz: d87fe2f303acf7e1d8b658950a1e591800eaf8a0f8bbdd35637355ac6856f571
3
+ metadata.gz: e0e19bd3b705bd0a2c680d367ea7420941d5df1c5b245317170b9c31fd177006
4
+ data.tar.gz: f826cbfb501dfd844ff1096b8561ffc8a2e4f589d51d186ce063e4cfcabc65aa
5
5
  SHA512:
6
- metadata.gz: c83298b6f11a500e50f4e530de5421f32d15f7ea72d3a6aea18cd4330f832073a2000a68228b0237313e709b3e4adba570b140837256798ff3987b9eb0bb0fc9
7
- data.tar.gz: 80405a6c1d1f99a7b65ed9491bd17c0d4143a5d5f212c6408988c9de329bc2bee2f2c6c1421d6134cc7f3d4c23ed2da06d0ba76509f6ae191f0236e83c53bdf8
6
+ metadata.gz: 8f47ca78fad6ebc47e9a76efd32e8009e6b8196256b06edef38dc1081a4eafb57f0f880e69d3e423ef5dffe6f66f2651c6c1fa2ca4002ad1c5be352b541bdfb3
7
+ data.tar.gz: f6e95e7a313ece5ebfb1af584d2cd11648575a6121a0ff0b807180e396bfb8102b1bc0cc1914d96e26058273193dbf6014c0acd6ded8dbef284cac6d0279ab79
@@ -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,87 @@
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: Build with Rails ${{ matrix.rails_version }}
47
+ env:
48
+ RAILS_VERSION: ${{ matrix.rails_version }}
49
+ run: |
50
+ bundle install --jobs 4 --retry 3
51
+ bundle exec rake
52
+
53
+ compare_allocation:
54
+ name: Compare memory allocation with ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }}
55
+ runs-on: ${{ matrix.os }}
56
+ needs: test
57
+ env:
58
+ RAILS_VERSION: ${{ matrix.rails_version }}
59
+ strategy:
60
+ matrix:
61
+ rails_version: [5.2, 6.0]
62
+ ruby_version: [2.6, 2.7]
63
+ os: [ubuntu-latest]
64
+ steps:
65
+ - name: Set up Ruby ${{ matrix.ruby_version }}
66
+ uses: ruby/setup-ruby@v1
67
+ with:
68
+ bundler: 1
69
+ ruby-version: ${{ matrix.ruby_version }}
70
+
71
+ - uses: actions/checkout@v2
72
+ with:
73
+ ref: master
74
+
75
+ - name: Build and run allocation report on master
76
+ run: |
77
+ bundle install --jobs 4 --retry 3
78
+ bundle exec ruby benchmarks/allocation_comparison.rb
79
+
80
+ - uses: actions/checkout@v1
81
+
82
+ - name: Rebuild on the branch
83
+ run: |
84
+ bundle install --jobs 4 --retry 3
85
+ - name: Run allocation report on the branch
86
+ run: |
87
+ 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
@@ -11,3 +11,5 @@ Gemfile.lock
11
11
  .ruby-gemset
12
12
  .idea
13
13
  *.rdb
14
+
15
+ examples/**/node_modules
@@ -13,33 +13,45 @@ Metrics/ClassLength:
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
26
  Max: 30
27
27
 
28
- Style/SignalException:
28
+ Style/SymbolArray:
29
+ Enabled: false
30
+
31
+ Style/PercentLiteralDelimiters:
32
+ Enabled: false
33
+
34
+ Style/FrozenStringLiteralComment:
29
35
  Enabled: false
30
36
 
31
- Performance/Casecmp:
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
 
@@ -52,10 +64,11 @@ Style/CaseEquality:
52
64
  Style/DoubleNegation:
53
65
  Enabled: false
54
66
 
55
- Style/FileName:
56
- Exclude:
57
- - 'lib/sentry-raven-without-integrations.rb'
58
- - 'lib/sentry-raven.rb'
67
+ Style/GuardClause:
68
+ Enabled: false
69
+
70
+ Style/RedundantBegin:
71
+ Enabled: false
59
72
 
60
73
  Style/NumericLiterals:
61
74
  Exclude:
@@ -64,6 +77,9 @@ Style/NumericLiterals:
64
77
  Style/HashSyntax:
65
78
  EnforcedStyle: hash_rockets
66
79
 
80
+ Style/IfUnlessModifier:
81
+ Enabled: false
82
+
67
83
  Lint/RescueException:
68
84
  Exclude:
69
85
  - 'lib/raven/base.rb'
@@ -72,3 +88,22 @@ Lint/RescueException:
72
88
  - 'lib/raven/integrations/rack.rb'
73
89
  - 'lib/raven/integrations/sidekiq.rb'
74
90
  - 'spec/raven/event_spec.rb'
91
+
92
+ Lint/SuppressedException:
93
+ Enabled: false
94
+
95
+ Lint/AssignmentInCondition:
96
+ Enabled: false
97
+
98
+ Layout/LineLength:
99
+ Max: 155
100
+
101
+ Naming/FileName:
102
+ Exclude:
103
+ - 'lib/sentry-raven-without-integrations.rb'
104
+ - 'lib/sentry-raven.rb'
105
+ - 'lib/raven/integrations/rack-timeout.rb'
106
+
107
+ Naming/MethodParameterName:
108
+ Enabled: false
109
+
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ file_names = ['lib/raven/version.rb']
4
+
5
+ file_names.each do |file_name|
6
+ text = File.read(file_name)
7
+ new_contents = text.gsub(/\d.\d.\d/, ARGV[1])
8
+ File.open(file_name, "w") {|file| file.puts new_contents }
9
+ end
@@ -1,3 +1,40 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 3.0.4
6
+
7
+ - fix: Don't log warning messages when it doesn't need to (#1000)
8
+ - fix: Revert "Refactor Raven::Client class" (#1002)
9
+
10
+ ## 3.0.3
11
+
12
+ - fix: Ensure Processor::Cookie can run after Processor::RemoveCircularReferences (#996)
13
+ - fix: Avoid mutating user passed in options (#994)
14
+ - fix: Fix/Refactor Raven::Cli (#989)
15
+ - ref: Refactor Raven::Client class (#995)
16
+ - It adds `Event#message_from_exception` and `Event#log_message` interfaces
17
+
18
+ ## 3.0.2
19
+
20
+ - fix: Add gem target for craft
21
+
22
+ ## 3.0.1
23
+
24
+ - fix: Improve SanitizeData processor (#984)
25
+ - fix: Masking cookies as key/pair instead of a single string (#983)
26
+ - fix: Transports classes' requiring issue (#986)
27
+ - fix: Frozen string issues (#977)
28
+ - feat: Officially support Rails 6 (#982)
29
+
30
+ 3.0.0
31
+ ----
32
+
33
+ * SDK now requires Ruby >= 2.3
34
+ * REF: Retain any literal "HTTP-" in header names [@elliterate, #950]
35
+ * REF: Delete JSON spec for recursive hashes [@ksylvest, #952]
36
+ * FEAT: Bump faraday version to latest [@ksylvest, #946]
37
+
1
38
  2.13.0
2
39
  ----
3
40
 
@@ -475,7 +512,7 @@ OTHER CHANGES:
475
512
  0.12.0
476
513
  ------
477
514
 
478
- - 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.getsentry.com/hosted/clients/ruby/config/). [jamescway, #232]
515
+ - 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]
479
516
  - 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]
480
517
  - Dependency on `uuidtools` has been removed. [nateberkopec, #231]
481
518
 
@@ -0,0 +1,26 @@
1
+ <p align="center">
2
+ <a href="https://sentry.io" target="_blank" align="center">
3
+ <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4
+ </a>
5
+ <br />
6
+ </p>
7
+
8
+ # Contributing
9
+
10
+ We welcome suggested improvements and bug fixes in the form of pull requests. The guide below will help you get started, but if you have further questions, please feel free to reach out on [Discord](https://discord.gg/Ww9hbqr).
11
+
12
+
13
+ ## Making a release
14
+
15
+ Install and use `craft`: https://github.com/getsentry/craft
16
+
17
+ Make sure the `CHANGELOG.md` is update and latest `master` contains all changes.
18
+
19
+ Run:
20
+
21
+ ```bash
22
+ craft prepare x.x.x
23
+ ```
24
+
25
+ Where `x.x.x` stands for the version you want to release.
26
+ Afterwards reach out to an employee of Sentry, they will cut a release by running the `publish` process of `craft`.
data/Gemfile CHANGED
@@ -2,37 +2,32 @@ source "https://rubygems.org/"
2
2
 
3
3
  gemspec
4
4
 
5
- if ENV["RAILS_VERSION"] && (ENV["RAILS_VERSION"].to_i == 4)
6
- gem "rails", "< 5"
7
- gem "rspec-rails", "> 3"
8
- elsif ENV["RAILS_VERSION"] && (ENV["RAILS_VERSION"].to_i == 0)
9
- # no-op. No Rails.
10
- else
11
- gem "rails", "< 6"
12
- gem "rspec-rails", "> 3"
13
- end
5
+ rails_version = ENV["RAILS_VERSION"]
6
+ rails_version = "5.2" if rails_version.nil?
14
7
 
15
- if RUBY_VERSION < '2.0'
16
- gem "mime-types", "< 3.0.0"
17
- gem "nokogiri", "~> 1.6.8"
18
- gem "rack", "~> 1.6.8"
19
- gem "sidekiq", "< 3.2"
20
- gem "rack-timeout", "0.3.0"
21
- else
22
- gem "rack"
23
- gem "sidekiq"
24
- gem "rack-timeout"
8
+ if rails_version.to_f != 0
9
+ gem "rails", "~> #{rails_version}"
10
+ gem "rspec-rails", "~> 4.0"
25
11
  end
12
+
13
+ gem "sidekiq"
14
+
15
+ gem "rack"
16
+ gem "rack-timeout"
17
+
26
18
  gem "pry"
27
- gem "pry-coolline"
28
19
  gem "benchmark-ips"
29
- gem "benchmark-ipsa" if RUBY_VERSION > '2.0'
20
+ gem "benchmark_driver"
21
+ gem "benchmark-ipsa"
22
+ gem "benchmark-memory"
30
23
  gem "ruby-prof", platform: :mri
31
24
  gem "rake", "> 12"
32
- gem "rubocop", "~> 0.41.1" # Last version that supported 1.9, upgrade to 0.50 after we drop 1.9
33
- gem "rspec", "> 3"
34
- gem "capybara" # rspec system tests
25
+ gem "rubocop", "~> 0.81.0"
26
+ gem "rspec", "~> 3.9.0"
27
+ gem "capybara", "~> 3.15.0" # rspec system tests
35
28
  gem "puma" # rspec system tests
36
29
 
37
30
  gem "timecop"
38
- gem "test-unit", platform: :mri if RUBY_VERSION > '2.2'
31
+ gem "test-unit"
32
+ gem "simplecov"
33
+ gem "codecov"
data/README.md CHANGED
@@ -8,7 +8,8 @@
8
8
  # Raven-Ruby, the Ruby Client for Sentry
9
9
 
10
10
  [![Gem Version](https://img.shields.io/gem/v/sentry-raven.svg)](https://rubygems.org/gems/sentry-raven)
11
- [![Build Status](https://img.shields.io/travis/getsentry/raven-ruby/master.svg)](https://travis-ci.org/getsentry/raven-ruby)
11
+ ![Build Status](https://github.com/getsentry/raven-ruby/workflows/Test/badge.svg)
12
+ [![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/raven-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/raven-ruby/branch/master)
12
13
  [![Gem](https://img.shields.io/gem/dt/sentry-raven.svg)](https://rubygems.org/gems/sentry-raven/)
13
14
  [![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)
14
15
 
@@ -19,7 +20,7 @@ The official Ruby-language client and integration layer for the [Sentry](https:/
19
20
 
20
21
  ## Requirements
21
22
 
22
- We test on Ruby 1.9, 2.2, 2.3, and 2.4 at the latest patchlevel/teeny version. We also support JRuby 1.7 and 9.0. Our Rails integration works with Rails 4.2+ (including Rails 5).
23
+ We test on Ruby 2.3, 2.4, 2.5, 2.6 and 2.7 at the latest patchlevel/teeny version. We also support JRuby 9.0. Our Rails integration works with Rails 4.2+, including Rails 5 and Rails 6.
23
24
 
24
25
  ## Getting Started
25
26
 
@@ -29,7 +30,7 @@ We test on Ruby 1.9, 2.2, 2.3, and 2.4 at the latest patchlevel/teeny version. W
29
30
  gem "sentry-raven"
30
31
  ```
31
32
 
32
- ### Raven only runs when SENTRY_DSN is set
33
+ ### Raven only runs when Sentry DSN is set
33
34
 
34
35
  Raven will capture and send exceptions to the Sentry server whenever its DSN is set. This makes environment-based configuration easy - if you don't want to send errors in a certain environment, just don't set the DSN in that environment!
35
36
 
@@ -38,7 +39,7 @@ Raven will capture and send exceptions to the Sentry server whenever its DSN is
38
39
  export SENTRY_DSN=http://public@example.com/project-id
39
40
  ```
40
41
  ```ruby
41
- # Or you can configure the client in the code (not recommended - keep your DSN secret!)
42
+ # Or you can configure the client in the code.
42
43
  Raven.configure do |config|
43
44
  config.dsn = 'http://public@example.com/project-id'
44
45
  end
@@ -48,11 +49,11 @@ end
48
49
 
49
50
  **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).
50
51
 
51
- 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.getsentry.com/hosted/clients/ruby/config/)
52
+ 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/config/)
52
53
 
53
54
  ### Usage
54
55
 
55
- **If you use Rails, you're already done - no more configuration required!** Check [Integrations](https://docs.getsentry.com/hosted/clients/ruby/integrations/) for more details on other gems Sentry integrates with automatically.
56
+ **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.
56
57
 
57
58
  Otherwise, Raven supports two methods of capturing exceptions:
58
59
 
@@ -111,19 +112,28 @@ config.transport_failure_callback = lambda { |event|
111
112
 
112
113
  #### Context
113
114
 
114
- Much of the usefulness of Sentry comes from additional context data with the events. Raven makes this very convenient by providing methods to set thread local context data that is then submitted automatically with all events.
115
-
116
- There are three primary methods for providing request context:
115
+ Much of the usefulness of Sentry comes from additional context data with the events. Raven makes this very convenient by providing methods to set thread local context data that is then submitted automatically with all events:
117
116
 
118
117
  ```ruby
119
- # bind the logged in user
120
118
  Raven.user_context email: 'foo@example.com'
121
119
 
122
- # tag the request with something interesting
123
- Raven.tags_context interesting: 'yes'
120
+ Raven.tags.merge!(interesting: 'yes')
121
+
122
+ Raven.extra.merge!(additional_info: 'foo')
123
+ ```
124
+
125
+ You can also use `tags_context` and `extra_context` to provide scoped information:
126
+
127
+ ```ruby
128
+ Raven.tags_context(interesting: 'yes') do
129
+ # the `interesting: 'yes'` tag will only present in the requests sent inside the block
130
+ Raven.capture_exception(exception)
131
+ end
124
132
 
125
- # provide a bit of additional context
126
- Raven.extra_context happiness: 'very'
133
+ Raven.extra_context(additional_info: 'foo') do
134
+ # same as above, the `additional_info` will only present in this request
135
+ Raven.capture_exception(exception)
136
+ end
127
137
  ```
128
138
 
129
139
  For more information, see [Context](https://docs.sentry.io/clients/ruby/context/).