-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture trace of error reporting thread and identify with boolean flag #355
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f7961fb
feat: capture trace of error reporting thread and identify it with bo…
fractalwrench 60b5934
add changelog entry
fractalwrench 9461b25
feat: pass current thread into threadstate when notifying, rather tha…
fractalwrench 37f4de2
docs: update javadoc for threadstate
fractalwrench d75f08c
rename thread -> currentThread
fractalwrench 932397f
test: verify that the current thread is not always used in thread state
fractalwrench 213b33b
fix: add the current thread to the thread stacktrace map if it is not…
fractalwrench dc34285
refactor: factor current thread test logic into separate function
fractalwrench 3949a23
feat: use exception stacktrace when passed into threadstate construct…
fractalwrench 2f83a7c
feat: update exceptionHandler threadstate to record exception stacktr…
fractalwrench a544429
test: add mazerunner scenario for thread id
fractalwrench 3d3a5c4
build: update gemfile lock
fractalwrench 8f5d352
test: update mazerunner scenario to use latest error reporting step s…
fractalwrench ddffdef
Merge pull request #362 from bugsnag/thread-id-mazerunner
fractalwrench 36884de
Merge branch 'next' into thread-id
fractalwrench 4ad4542
Merge branch 'next' into thread-id
fractalwrench 4eb87e4
test: add mazerunner scenario for unhandled exception
fractalwrench File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,12 +1,13 @@ | ||
GIT | ||
remote: [email protected]:bugsnag/maze-runner | ||
revision: f7123450d5a75b719911c6dd3baa0507e6062c2d | ||
revision: 177f27da9966aed2cb87687fa8384d6141d2fa05 | ||
specs: | ||
bugsnag-maze-runner (1.0.0) | ||
cucumber (~> 3.1.0) | ||
cucumber-expressions (= 5.0.15) | ||
minitest (~> 5.0) | ||
rack (~> 2.0.0) | ||
rake (~> 12.3.0) | ||
test-unit (~> 3.2.0) | ||
|
||
GEM | ||
|
@@ -32,17 +33,18 @@ GEM | |
cucumber-tag_expressions (1.1.1) | ||
cucumber-wire (0.0.1) | ||
diff-lcs (1.3) | ||
gherkin (5.0.0) | ||
gherkin (5.1.0) | ||
method_source (0.9.0) | ||
minitest (5.11.3) | ||
multi_json (1.13.1) | ||
multi_test (0.1.2) | ||
power_assert (1.1.1) | ||
power_assert (1.1.3) | ||
pry (0.11.3) | ||
coderay (~> 1.1.0) | ||
method_source (~> 0.9.0) | ||
rack (2.0.5) | ||
test-unit (3.2.7) | ||
rake (12.3.1) | ||
test-unit (3.2.8) | ||
power_assert | ||
|
||
PLATFORMS | ||
|
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,20 @@ | ||
# For handled exceptions, the thread trace should be reported in the threads array. | ||
# For unhandled exceptions, the exception trace should be reported instead. | ||
|
||
Feature: Error Reporting Thread | ||
|
||
Scenario: Only 1 thread is flagged as the error reporting thread for handled exceptions | ||
When I run "HandledExceptionScenario" with the defaults | ||
Then I should receive a request | ||
And the request is a valid for the error reporting API | ||
And the thread with name "main" contains the error reporting flag | ||
And the "method" of stack frame 0 equals "com.bugsnag.android.mazerunner.scenarios.Scenario.generateException" | ||
And the payload field "events.0.threads.0.stacktrace.0.method" ends with "getThreadStackTrace" | ||
|
||
Scenario: Only 1 thread is flagged as the error reporting thread for unhandled exceptions | ||
When I run "UnhandledExceptionScenario" with the defaults | ||
Then I should receive 1 request | ||
And the request is a valid for the error reporting API | ||
And the thread with name "main" contains the error reporting flag | ||
And the "method" of stack frame 0 equals "com.bugsnag.android.mazerunner.scenarios.Scenario.generateException" | ||
And the payload field "events.0.threads.0.stacktrace.0.method" equals "com.bugsnag.android.mazerunner.scenarios.Scenario.generateException" |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding a scenario for unhandled as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good point.