-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added session tracking basics to notifier * Added session config to config * Added session tracking mechanisms * Send bugsnag properties in headers * Added backoff to delivery * Minor updates and fixes * Added tests for session-tracker * Ensured success code is correctly checked before backoff * Added hook to rails * Ensured deliver doesn't send empty sessions * Replaced rails sessions with rack to service both * Complete re-do of backoff throttling * Changed success criteria on sessions * Added checks on asynchronous delivery * Updated tests * Added maximum amount of sessions to be sent at one time * Added final attempt to send sessions at exit * Style update * Changed to sessionCounts * Registered final at_exit block to send sessions * Updated tests * Fixed config ref * Ensured thread sessions accessed through accessor * Refactored some backoff functionality into functions * Fixed issue with accessing get/set session * Fixed issue with get_current_session calls * Added session-tracking to rails-51 example * Removed unnecessary info * Added fallback to send sessions every 5 minutes * Ensured deliver_fallback only terminated if exists * Ensured headers are backwards compatible * v6.3.0.beta.0
- Loading branch information
Showing
20 changed files
with
601 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Bugsnag.configure do |config| | ||
config.api_key = "YOUR_API_KEY_HERE" | ||
config.api_key = "YOUR_API_KEY" | ||
config.track_sessions = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.