raygun-apm-rails 1.1.4 → 1.1.5
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/lib/raygun/apm/rails/middleware.rb +10 -6
 - data/lib/raygun/apm/rails/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 985a5c6277614425022e771885d60774cedc3adf7e6b984c72ab9492365ea98d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 69bd21d60eef2a3d224ee432b013c31e9907f008b80be5dd43256b0fbd135e47
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 90ed4a1ed6485598e332867679ec9386e60b0b7b637faeb165a713cc49f54dbcbf77d8291b3eacb23c5b43fc49aaf44782e4ab3827da71c43ef0ee1c6ad70242
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6024ec51294d4bdf19d664d9e2583013211c8e91ca3908eb594b0301224869de517386a8e4e7666ab35bcf7af7f67ea472442ba6131d718d955d57a191ebbbdf
         
     | 
| 
         @@ -7,11 +7,13 @@ module Raygun 
     | 
|
| 
       7 
7 
     | 
    
         
             
                        @app = app
         
     | 
| 
       8 
8 
     | 
    
         
             
                        @mutex = Mutex.new
         
     | 
| 
       9 
9 
     | 
    
         
             
                        @tracer = nil
         
     | 
| 
      
 10 
     | 
    
         
            +
                        @http_in_subscriber = nil
         
     | 
| 
      
 11 
     | 
    
         
            +
                        @sql_subscriber = nil
         
     | 
| 
       10 
12 
     | 
    
         
             
                      end
         
     | 
| 
       11 
13 
     | 
    
         | 
| 
       12 
14 
     | 
    
         
             
                      def call(env)
         
     | 
| 
       13 
     | 
    
         
            -
                         
     | 
| 
       14 
     | 
    
         
            -
                        [ 
     | 
| 
      
 15 
     | 
    
         
            +
                        status, headers, response = instrument(env)
         
     | 
| 
      
 16 
     | 
    
         
            +
                        [status, headers, response]
         
     | 
| 
       15 
17 
     | 
    
         
             
                      end
         
     | 
| 
       16 
18 
     | 
    
         | 
| 
       17 
19 
     | 
    
         
             
                      private
         
     | 
| 
         @@ -27,7 +29,7 @@ module Raygun 
     | 
|
| 
       27 
29 
     | 
    
         
             
                        end
         
     | 
| 
       28 
30 
     | 
    
         
             
                        if @tracer
         
     | 
| 
       29 
31 
     | 
    
         
             
                          # For the exceptional HTTP IN handler
         
     | 
| 
       30 
     | 
    
         
            -
                           
     | 
| 
      
 32 
     | 
    
         
            +
                          Thread.current[:_raygun_request_started] = @tracer.now
         
     | 
| 
       31 
33 
     | 
    
         
             
                          @tracer.start_trace
         
     | 
| 
       32 
34 
     | 
    
         
             
                        end
         
     | 
| 
       33 
35 
     | 
    
         
             
                        exception = nil
         
     | 
| 
         @@ -78,7 +80,9 @@ module Raygun 
     | 
|
| 
       78 
80 
     | 
    
         
             
                        warn "[Raygun APM] shutting down due to error - #{exception.message} #{exception.backtrace.join("\n")}",
         
     | 
| 
       79 
81 
     | 
    
         
             
                        # Kill extended event subcriptions
         
     | 
| 
       80 
82 
     | 
    
         
             
                        ActiveSupport::Notifications.unsubscribe(@http_in_subscriber)
         
     | 
| 
      
 83 
     | 
    
         
            +
                        @http_in_subscriber = nil
         
     | 
| 
       81 
84 
     | 
    
         
             
                        ActiveSupport::Notifications.unsubscribe(@sql_subscriber)
         
     | 
| 
      
 85 
     | 
    
         
            +
                        @sql_subscriber = nil
         
     | 
| 
       82 
86 
     | 
    
         
             
                        warn "[Raygun APM] notification hooks unsubscribed"
         
     | 
| 
       83 
87 
     | 
    
         
             
                        @tracer.end_trace if @tracer
         
     | 
| 
       84 
88 
     | 
    
         
             
                        # Let the GC clean up the sink thread through the finalizer below
         
     | 
| 
         @@ -130,7 +134,7 @@ module Raygun 
     | 
|
| 
       130 
134 
     | 
    
         
             
                        event[:url] = req.url
         
     | 
| 
       131 
135 
     | 
    
         
             
                        event[:verb] = req.request_method
         
     | 
| 
       132 
136 
     | 
    
         
             
                        event[:status] = 500
         
     | 
| 
       133 
     | 
    
         
            -
                        event[:duration] = @tracer.now -  
     | 
| 
      
 137 
     | 
    
         
            +
                        event[:duration] = @tracer.now - Thread.current[:_raygun_request_started]
         
     | 
| 
       134 
138 
     | 
    
         
             
                        event[:timestamp] = @tracer.now
         
     | 
| 
       135 
139 
     | 
    
         
             
                        event[:tid] = @tracer.get_thread_id(Thread.current)
         
     | 
| 
       136 
140 
     | 
    
         
             
                        @tracer.emit(event)
         
     | 
| 
         @@ -140,7 +144,7 @@ module Raygun 
     | 
|
| 
       140 
144 
     | 
    
         
             
                      end
         
     | 
| 
       141 
145 
     | 
    
         | 
| 
       142 
146 
     | 
    
         
             
                      def http_in_event
         
     | 
| 
       143 
     | 
    
         
            -
                         
     | 
| 
      
 147 
     | 
    
         
            +
                        Thread.current[:_raygun_http_in_event] ||= Raygun::Apm::Event::HttpIn.new
         
     | 
| 
       144 
148 
     | 
    
         
             
                      end
         
     | 
| 
       145 
149 
     | 
    
         | 
| 
       146 
150 
     | 
    
         
             
                      def sql_handler(args)
         
     | 
| 
         @@ -180,7 +184,7 @@ module Raygun 
     | 
|
| 
       180 
184 
     | 
    
         
             
                      end
         
     | 
| 
       181 
185 
     | 
    
         | 
| 
       182 
186 
     | 
    
         
             
                      def sql_event
         
     | 
| 
       183 
     | 
    
         
            -
                         
     | 
| 
      
 187 
     | 
    
         
            +
                        Thread.current[:_raygun_sql_event] ||= Raygun::Apm::Event::Sql.new
         
     | 
| 
       184 
188 
     | 
    
         
             
                      end
         
     | 
| 
       185 
189 
     | 
    
         | 
| 
       186 
190 
     | 
    
         
             
                      def Ruby_APM_profiler_trace
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: raygun-apm-rails
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.1.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Raygun Limited
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-05-12 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: raygun-apm
         
     |