Sha256: c0bb54a99a1fd7bf16d685ffdccffa71007e97d28e815b7c8dc705b6f92f362e

Contents?: true

Size: 445 Bytes

Versions: 6

Compression:

Stored size: 445 Bytes

Contents

module Bugsnag::Middleware
  class SessionData
    def initialize(bugsnag)
      @bugsnag = bugsnag
    end

    def call(report)
      session = Bugsnag::SessionTracker.get_current_session
      unless session.nil?
        if report.unhandled
          session[:events][:unhandled] += 1
        else
          session[:events][:handled] += 1
        end
        report.session = session
      end

      @bugsnag.call(report)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bugsnag-6.6.3 lib/bugsnag/middleware/session_data.rb
bugsnag-6.6.2 lib/bugsnag/middleware/session_data.rb
bugsnag-6.6.1 lib/bugsnag/middleware/session_data.rb
bugsnag-6.6.0 lib/bugsnag/middleware/session_data.rb
bugsnag-6.5.0 lib/bugsnag/middleware/session_data.rb
bugsnag-6.3.0.beta.0 lib/bugsnag/middleware/session_data.rb