sentry-ruby-core 4.1.5 → 4.1.6
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/CHANGELOG.md +6 -0
 - data/Gemfile +3 -0
 - data/Makefile +4 -0
 - data/lib/sentry/breadcrumb.rb +25 -6
 - data/lib/sentry/breadcrumb_buffer.rb +1 -1
 - data/lib/sentry/configuration.rb +1 -9
 - data/lib/sentry/rack/capture_exceptions.rb +1 -1
 - data/lib/sentry/version.rb +1 -1
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 584f6d4758f8c7756443aa2f242e0c8c8d8f34b49089863714ae52b76b18c4af
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4a0c8fc92d430a1b8b0726d2cee9c96d4ddc918f99702081c93b5af9b75a53a3
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d1ebaf29b9c6712e7f23ef91cad67e0ddb50fcd2849b45e1fba31e7e7e58acdacbf1f64cb6abb50c1269aa4dedf0e8dd1bd5df7cc8ea83a0be223c2124ab2652
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 3f2e9ff72da83a8644de0e2ca6cc85b3febaa7a3bd9b84abf10e91047207debfcf83e446ee63216dbfc097947b874cd605ffa89947e162331f33f103b599ae36
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,5 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Changelog
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## 4.1.6
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            - Don't detect project root for Rails apps [#1243](https://github.com/getsentry/sentry-ruby/pull/1243)
         
     | 
| 
      
 6 
     | 
    
         
            +
            - Separate individual breadcrumb's data serialization [#1250](https://github.com/getsentry/sentry-ruby/pull/1250)
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Capture sentry-trace with the correct http header key [#1260](https://github.com/getsentry/sentry-ruby/pull/1260)
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       3 
9 
     | 
    
         
             
            ## 4.1.5
         
     | 
| 
       4 
10 
     | 
    
         | 
| 
       5 
11 
     | 
    
         
             
            - Serialize event hint before passing it to the async block [#1231](https://github.com/getsentry/sentry-ruby/pull/1231)
         
     | 
    
        data/Gemfile
    CHANGED
    
    | 
         @@ -3,6 +3,9 @@ source "https://rubygems.org" 
     | 
|
| 
       3 
3 
     | 
    
         
             
            gem "sentry-ruby-core", path: "./"
         
     | 
| 
       4 
4 
     | 
    
         
             
            gem "sentry-ruby", path: "./"
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
      
 6 
     | 
    
         
            +
            # TODO: Remove this if https://github.com/jruby/jruby/issues/6547 is addressed
         
     | 
| 
      
 7 
     | 
    
         
            +
            gem "i18n", "<= 1.8.7"
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       6 
9 
     | 
    
         
             
            gem "rake", "~> 12.0"
         
     | 
| 
       7 
10 
     | 
    
         
             
            gem "rspec", "~> 3.0"
         
     | 
| 
       8 
11 
     | 
    
         
             
            gem "codecov", "0.2.12"
         
     | 
    
        data/Makefile
    ADDED
    
    
    
        data/lib/sentry/breadcrumb.rb
    CHANGED
    
    | 
         @@ -1,5 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Sentry
         
     | 
| 
       2 
2 
     | 
    
         
             
              class Breadcrumb
         
     | 
| 
      
 3 
     | 
    
         
            +
                DATA_SERIALIZATION_ERROR_MESSAGE = "[data were removed due to serialization issues]"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
       3 
5 
     | 
    
         
             
                attr_accessor :category, :data, :message, :level, :timestamp, :type
         
     | 
| 
       4 
6 
     | 
    
         | 
| 
       5 
7 
     | 
    
         
             
                def initialize(category: nil, data: nil, message: nil, timestamp: nil, level: nil, type: nil)
         
     | 
| 
         @@ -13,13 +15,30 @@ module Sentry 
     | 
|
| 
       13 
15 
     | 
    
         | 
| 
       14 
16 
     | 
    
         
             
                def to_hash
         
     | 
| 
       15 
17 
     | 
    
         
             
                  {
         
     | 
| 
       16 
     | 
    
         
            -
                    : 
     | 
| 
       17 
     | 
    
         
            -
                    : 
     | 
| 
       18 
     | 
    
         
            -
                    : 
     | 
| 
       19 
     | 
    
         
            -
                    : 
     | 
| 
       20 
     | 
    
         
            -
                    : 
     | 
| 
       21 
     | 
    
         
            -
                    : 
     | 
| 
      
 18 
     | 
    
         
            +
                    category: @category,
         
     | 
| 
      
 19 
     | 
    
         
            +
                    data: serialized_data,
         
     | 
| 
      
 20 
     | 
    
         
            +
                    level: @level,
         
     | 
| 
      
 21 
     | 
    
         
            +
                    message: @message,
         
     | 
| 
      
 22 
     | 
    
         
            +
                    timestamp: @timestamp,
         
     | 
| 
      
 23 
     | 
    
         
            +
                    type: @type
         
     | 
| 
       22 
24 
     | 
    
         
             
                  }
         
     | 
| 
       23 
25 
     | 
    
         
             
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                private
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                def serialized_data
         
     | 
| 
      
 30 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 31 
     | 
    
         
            +
                    ::JSON.parse(::JSON.generate(@data))
         
     | 
| 
      
 32 
     | 
    
         
            +
                  rescue Exception => e
         
     | 
| 
      
 33 
     | 
    
         
            +
                    Sentry.logger.debug(LOGGER_PROGNAME) do
         
     | 
| 
      
 34 
     | 
    
         
            +
                      <<~MSG
         
     | 
| 
      
 35 
     | 
    
         
            +
            can't serialize breadcrumb data because of error: #{e}
         
     | 
| 
      
 36 
     | 
    
         
            +
            data: #{@data}
         
     | 
| 
      
 37 
     | 
    
         
            +
                      MSG
         
     | 
| 
      
 38 
     | 
    
         
            +
                    end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                    DATA_SERIALIZATION_ERROR_MESSAGE
         
     | 
| 
      
 41 
     | 
    
         
            +
                  end
         
     | 
| 
      
 42 
     | 
    
         
            +
                end
         
     | 
| 
       24 
43 
     | 
    
         
             
              end
         
     | 
| 
       25 
44 
     | 
    
         
             
            end
         
     | 
    
        data/lib/sentry/configuration.rb
    CHANGED
    
    | 
         @@ -164,7 +164,7 @@ module Sentry 
     | 
|
| 
       164 
164 
     | 
    
         
             
                  self.inspect_exception_causes_for_exclusion = false
         
     | 
| 
       165 
165 
     | 
    
         
             
                  self.linecache = ::Sentry::LineCache.new
         
     | 
| 
       166 
166 
     | 
    
         
             
                  self.logger = ::Sentry::Logger.new(STDOUT)
         
     | 
| 
       167 
     | 
    
         
            -
                  self.project_root =  
     | 
| 
      
 167 
     | 
    
         
            +
                  self.project_root = Dir.pwd
         
     | 
| 
       168 
168 
     | 
    
         | 
| 
       169 
169 
     | 
    
         
             
                  self.release = detect_release
         
     | 
| 
       170 
170 
     | 
    
         
             
                  self.sample_rate = 1.0
         
     | 
| 
         @@ -267,14 +267,6 @@ module Sentry 
     | 
|
| 
       267 
267 
     | 
    
         | 
| 
       268 
268 
     | 
    
         
             
                private
         
     | 
| 
       269 
269 
     | 
    
         | 
| 
       270 
     | 
    
         
            -
                def detect_project_root
         
     | 
| 
       271 
     | 
    
         
            -
                  if defined? Rails.root # we are in a Rails application
         
     | 
| 
       272 
     | 
    
         
            -
                    Rails.root.to_s
         
     | 
| 
       273 
     | 
    
         
            -
                  else
         
     | 
| 
       274 
     | 
    
         
            -
                    Dir.pwd
         
     | 
| 
       275 
     | 
    
         
            -
                  end
         
     | 
| 
       276 
     | 
    
         
            -
                end
         
     | 
| 
       277 
     | 
    
         
            -
             
     | 
| 
       278 
270 
     | 
    
         
             
                def detect_release
         
     | 
| 
       279 
271 
     | 
    
         
             
                  detect_release_from_env ||
         
     | 
| 
       280 
272 
     | 
    
         
             
                    detect_release_from_git ||
         
     | 
| 
         @@ -17,7 +17,7 @@ module Sentry 
     | 
|
| 
       17 
17 
     | 
    
         
             
                      scope.set_rack_env(env)
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
                      span =
         
     | 
| 
       20 
     | 
    
         
            -
                        if sentry_trace = env[" 
     | 
| 
      
 20 
     | 
    
         
            +
                        if sentry_trace = env["HTTP_SENTRY_TRACE"]
         
     | 
| 
       21 
21 
     | 
    
         
             
                          Sentry::Transaction.from_sentry_trace(sentry_trace, name: scope.transaction_name, op: transaction_op)
         
     | 
| 
       22 
22 
     | 
    
         
             
                        else
         
     | 
| 
       23 
23 
     | 
    
         
             
                          Sentry.start_transaction(name: scope.transaction_name, op: transaction_op)
         
     | 
    
        data/lib/sentry/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: sentry-ruby-core
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 4.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 4.1.6
         
     | 
| 
       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-02-02 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: faraday
         
     | 
| 
         @@ -53,6 +53,7 @@ files: 
     | 
|
| 
       53 
53 
     | 
    
         
             
            - CODE_OF_CONDUCT.md
         
     | 
| 
       54 
54 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       55 
55 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
      
 56 
     | 
    
         
            +
            - Makefile
         
     | 
| 
       56 
57 
     | 
    
         
             
            - README.md
         
     | 
| 
       57 
58 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       58 
59 
     | 
    
         
             
            - bin/console
         
     |