bugsnag 6.12.1 → 6.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.buildkite/pipeline.yml +470 -0
- data/.rubocop.yml +55 -0
- data/.rubocop_todo.yml +530 -160
- data/CHANGELOG.md +73 -0
- data/CONTRIBUTING.md +1 -9
- data/Gemfile +14 -7
- data/TESTING.md +81 -0
- data/VERSION +1 -1
- data/docker-compose.yml +46 -0
- data/dockerfiles/Dockerfile.jruby-unit-tests +13 -0
- data/dockerfiles/Dockerfile.ruby-maze-runner +26 -0
- data/dockerfiles/Dockerfile.ruby-unit-tests +12 -0
- data/features/delayed_job.feature +6 -22
- data/features/fixtures/delayed_job/Dockerfile +2 -4
- data/features/fixtures/delayed_job/app/Gemfile +1 -1
- data/features/fixtures/delayed_job/app/Rakefile +18 -0
- data/features/fixtures/docker-compose.yml +32 -40
- data/features/fixtures/expected_breadcrumbs/active_job.json +9 -0
- data/features/fixtures/expected_breadcrumbs/mongo_failed.json +15 -0
- data/features/fixtures/expected_breadcrumbs/mongo_filtered_request.json +15 -0
- data/features/fixtures/expected_breadcrumbs/mongo_filtered_result.json +15 -0
- data/features/fixtures/expected_breadcrumbs/mongo_success.json +14 -0
- data/features/fixtures/expected_breadcrumbs/request.json +13 -0
- data/features/fixtures/expected_breadcrumbs/sql_with_bindings.json +12 -0
- data/features/fixtures/expected_breadcrumbs/sql_without_bindings.json +11 -0
- data/features/fixtures/plain/Dockerfile +2 -2
- data/features/fixtures/plain/app/app.rb +1 -3
- data/features/fixtures/plain/app/delivery/fork_threadpool.rb +3 -1
- data/features/fixtures/plain/app/report_modification/initiators/handled_on_error.rb +10 -0
- data/features/fixtures/plain/app/report_modification/initiators/unhandled_on_error.rb +11 -0
- data/features/fixtures/plain/app/stack_frame_modification/initiators/handled_on_error.rb +29 -0
- data/features/fixtures/plain/app/stack_frame_modification/initiators/unhandled_on_error.rb +26 -0
- data/features/fixtures/plain/app/unhandled/{Interrupt.rb → interrupt.rb} +0 -0
- data/features/fixtures/rack1/Dockerfile +2 -2
- data/features/fixtures/rack2/Dockerfile +2 -2
- data/features/fixtures/rails3/Dockerfile +2 -2
- data/features/fixtures/rails3/app/Gemfile +4 -0
- data/features/fixtures/rails3/app/config/initializers/bugsnag.rb +11 -2
- data/features/fixtures/rails4/Dockerfile +2 -5
- data/features/fixtures/rails4/app/config/initializers/bugsnag.rb +10 -1
- data/features/fixtures/rails5/Dockerfile +2 -2
- data/features/fixtures/rails5/app/Gemfile +3 -2
- data/features/fixtures/rails5/app/config/initializers/bugsnag.rb +10 -1
- data/features/fixtures/rails6/Dockerfile +2 -2
- data/features/fixtures/rails6/app/Gemfile +3 -2
- data/features/fixtures/rails6/app/app/controllers/mongo_controller.rb +22 -0
- data/features/fixtures/rails6/app/app/models/mongo_model.rb +6 -0
- data/features/fixtures/rails6/app/config/environments/development.rb +2 -0
- data/features/fixtures/rails6/app/config/environments/production.rb +1 -0
- data/features/fixtures/rails6/app/config/environments/rails_env.rb +1 -0
- data/features/fixtures/rails6/app/config/environments/test.rb +1 -0
- data/features/fixtures/rails6/app/config/initializers/bugsnag.rb +10 -1
- data/features/fixtures/rails6/app/config/mongoid.yml +23 -0
- data/features/fixtures/rails6/app/config/routes.rb +4 -0
- data/features/fixtures/resque/Dockerfile +2 -2
- data/features/fixtures/sidekiq/Dockerfile +5 -7
- data/features/fixtures/sidekiq/app/Gemfile +2 -1
- data/features/fixtures/sidekiq/app/Rakefile.rb +14 -0
- data/features/fixtures/sinatra1/Dockerfile +2 -2
- data/features/fixtures/sinatra2/Dockerfile +2 -2
- data/features/plain_features/add_tab.feature +30 -97
- data/features/plain_features/app_type.feature +6 -25
- data/features/plain_features/app_version.feature +6 -25
- data/features/plain_features/auto_notify.feature +4 -20
- data/features/plain_features/delivery.feature +12 -60
- data/features/plain_features/exception_data.feature +24 -94
- data/features/plain_features/filters.feature +9 -43
- data/features/plain_features/handled_errors.feature +16 -78
- data/features/plain_features/ignore_classes.feature +5 -23
- data/features/plain_features/ignore_report.feature +8 -24
- data/features/plain_features/proxies.feature +13 -56
- data/features/plain_features/release_stages.feature +9 -40
- data/features/plain_features/report_api_key.feature +11 -35
- data/features/plain_features/report_severity.feature +10 -35
- data/features/plain_features/report_stack_frames.feature +29 -93
- data/features/plain_features/report_user.feature +29 -96
- data/features/plain_features/unhandled_errors.feature +17 -88
- data/features/rails_features/api_key.feature +12 -58
- data/features/rails_features/app_type.feature +13 -58
- data/features/rails_features/app_version.feature +19 -80
- data/features/rails_features/auto_capture_sessions.feature +31 -112
- data/features/rails_features/auto_notify.feature +28 -105
- data/features/rails_features/before_notify.feature +18 -83
- data/features/rails_features/breadcrumbs.feature +40 -137
- data/features/rails_features/handled.feature +18 -82
- data/features/rails_features/ignore_classes.feature +12 -51
- data/features/rails_features/meta_data_filters.feature +9 -33
- data/features/rails_features/mongo_breadcrumbs.feature +22 -96
- data/features/rails_features/on_error.feature +29 -0
- data/features/rails_features/project_root.feature +19 -84
- data/features/rails_features/release_stage.feature +20 -82
- data/features/rails_features/send_code.feature +13 -55
- data/features/rails_features/send_environment.feature +7 -33
- data/features/rails_features/unhandled.feature +6 -31
- data/features/rails_features/user_info.feature +27 -65
- data/features/sidekiq.feature +12 -79
- data/features/steps/ruby_notifier_steps.rb +59 -15
- data/features/support/env.rb +12 -45
- data/lib/bugsnag.rb +109 -21
- data/lib/bugsnag/breadcrumbs/breadcrumbs.rb +0 -2
- data/lib/bugsnag/breadcrumbs/validator.rb +0 -6
- data/lib/bugsnag/cleaner.rb +129 -60
- data/lib/bugsnag/code_extractor.rb +137 -0
- data/lib/bugsnag/configuration.rb +58 -1
- data/lib/bugsnag/helpers.rb +2 -4
- data/lib/bugsnag/integrations/que.rb +7 -4
- data/lib/bugsnag/middleware/discard_error_class.rb +30 -0
- data/lib/bugsnag/middleware/exception_meta_data.rb +15 -9
- data/lib/bugsnag/middleware/ignore_error_class.rb +2 -0
- data/lib/bugsnag/middleware/rack_request.rb +2 -4
- data/lib/bugsnag/middleware_stack.rb +38 -3
- data/lib/bugsnag/on_error_callbacks.rb +33 -0
- data/lib/bugsnag/report.rb +4 -14
- data/lib/bugsnag/session_tracker.rb +3 -3
- data/lib/bugsnag/stacktrace.rb +28 -75
- data/spec/breadcrumbs/breadcrumb_spec.rb +1 -1
- data/spec/breadcrumbs/validator_spec.rb +1 -26
- data/spec/bugsnag_spec.rb +2 -2
- data/spec/cleaner_spec.rb +202 -10
- data/spec/code_extractor_spec.rb +129 -0
- data/spec/configuration_spec.rb +16 -1
- data/spec/fixtures/apps/rails-initializer-config/Gemfile +5 -1
- data/spec/fixtures/apps/rails-invalid-initializer-config/Gemfile +5 -1
- data/spec/fixtures/apps/rails-no-config/Gemfile +5 -1
- data/spec/fixtures/crashes/file1.rb +29 -0
- data/spec/fixtures/crashes/file2.rb +25 -0
- data/spec/fixtures/crashes/file_with_long_lines.rb +7 -0
- data/spec/fixtures/crashes/functions.rb +29 -0
- data/spec/fixtures/crashes/short_file.rb +2 -0
- data/spec/helper_spec.rb +0 -31
- data/spec/integrations/logger_spec.rb +1 -1
- data/spec/integrations/rack_spec.rb +8 -6
- data/spec/integrations/rake_spec.rb +1 -1
- data/spec/on_error_spec.rb +332 -0
- data/spec/report_spec.rb +331 -30
- data/spec/spec_helper.rb +14 -1
- data/spec/stacktrace_spec.rb +427 -74
- metadata +36 -7
- data/.travis.yml +0 -117
- data/features/plain_features/api_key.feature +0 -25
@@ -1,51 +1,20 @@
|
|
1
1
|
Feature: Release stage configuration options
|
2
2
|
|
3
|
-
|
4
|
-
Given I set environment variable "
|
5
|
-
And I configure the bugsnag endpoint
|
6
|
-
|
7
|
-
Scenario Outline: Doesn't notify in the wrong release stage
|
8
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby version>"
|
9
|
-
And I set environment variable "BUGSNAG_NOTIFY_RELEASE_STAGE" to "stage_one"
|
3
|
+
Scenario: Doesn't notify in the wrong release stage
|
4
|
+
Given I set environment variable "BUGSNAG_NOTIFY_RELEASE_STAGE" to "stage_one"
|
10
5
|
And I set environment variable "BUGSNAG_RELEASE_STAGE" to "stage_two"
|
11
|
-
|
12
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb"
|
6
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb"
|
13
7
|
And I wait for 1 second
|
14
|
-
Then I should receive
|
15
|
-
|
16
|
-
Examples:
|
17
|
-
| ruby version |
|
18
|
-
| 1.9.3 |
|
19
|
-
| 2.0 |
|
20
|
-
| 2.1 |
|
21
|
-
| 2.2 |
|
22
|
-
| 2.3 |
|
23
|
-
| 2.4 |
|
24
|
-
| 2.5 |
|
8
|
+
Then I should receive no requests
|
25
9
|
|
26
|
-
Scenario
|
27
|
-
Given I set environment variable "
|
28
|
-
And I set environment variable "BUGSNAG_NOTIFY_RELEASE_STAGE" to "stage_one"
|
10
|
+
Scenario: Does notify in the correct release stage
|
11
|
+
Given I set environment variable "BUGSNAG_NOTIFY_RELEASE_STAGE" to "stage_one"
|
29
12
|
And I set environment variable "BUGSNAG_RELEASE_STAGE" to "stage_one"
|
30
|
-
|
31
|
-
And I
|
32
|
-
|
33
|
-
Then I should receive a request
|
34
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
35
|
-
And the request used payload v4 headers
|
36
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
13
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb"
|
14
|
+
And I wait to receive a request
|
15
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
37
16
|
And the event "unhandled" is true
|
38
17
|
And the event "severity" equals "error"
|
39
18
|
And the event "severityReason.type" equals "unhandledException"
|
40
19
|
And the exception "errorClass" equals "RuntimeError"
|
41
20
|
And the "file" of stack frame 0 equals "/usr/src/app/configuration/send_unhandled.rb"
|
42
|
-
|
43
|
-
Examples:
|
44
|
-
| ruby version |
|
45
|
-
| 1.9.3 |
|
46
|
-
| 2.0 |
|
47
|
-
| 2.1 |
|
48
|
-
| 2.2 |
|
49
|
-
| 2.3 |
|
50
|
-
| 2.4 |
|
51
|
-
| 2.5 |
|
@@ -1,40 +1,16 @@
|
|
1
1
|
Feature: Plain report modify api key
|
2
2
|
|
3
|
-
Background:
|
4
|
-
Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
5
|
-
And I configure the bugsnag endpoint
|
6
|
-
|
7
3
|
Scenario Outline: A report can have its api_key modified
|
8
|
-
Given I set environment variable "
|
9
|
-
|
10
|
-
And I
|
11
|
-
|
12
|
-
And
|
13
|
-
Then I should receive a request
|
14
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
15
|
-
And the request used payload v4 headers
|
16
|
-
And the request contained the api key "abcdefghijklmnopqrstuvwxyz123456"
|
4
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
5
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/modify_api_key.rb"
|
6
|
+
And I wait to receive a request
|
7
|
+
Then the "Bugsnag-Api-Key" header equals "abcdefghijklmnopqrstuvwxyz123456"
|
8
|
+
And the payload field "apiKey" equals "abcdefghijklmnopqrstuvwxyz123456"
|
17
9
|
|
18
10
|
Examples:
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| 2.0 | unhandled_before_notify |
|
26
|
-
| 2.1 | handled_before_notify |
|
27
|
-
| 2.1 | handled_block |
|
28
|
-
| 2.1 | unhandled_before_notify |
|
29
|
-
| 2.2 | handled_before_notify |
|
30
|
-
| 2.2 | handled_block |
|
31
|
-
| 2.2 | unhandled_before_notify |
|
32
|
-
| 2.3 | handled_before_notify |
|
33
|
-
| 2.3 | handled_block |
|
34
|
-
| 2.3 | unhandled_before_notify |
|
35
|
-
| 2.4 | handled_before_notify |
|
36
|
-
| 2.4 | handled_block |
|
37
|
-
| 2.4 | unhandled_before_notify |
|
38
|
-
| 2.5 | handled_before_notify |
|
39
|
-
| 2.5 | handled_block |
|
40
|
-
| 2.5 | unhandled_before_notify |
|
11
|
+
| initiator |
|
12
|
+
| handled_before_notify |
|
13
|
+
| handled_block |
|
14
|
+
| unhandled_before_notify |
|
15
|
+
| handled_on_error |
|
16
|
+
| unhandled_on_error |
|
@@ -1,42 +1,17 @@
|
|
1
1
|
Feature: Plain report modify severity
|
2
2
|
|
3
|
-
Background:
|
4
|
-
Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
5
|
-
And I configure the bugsnag endpoint
|
6
|
-
|
7
3
|
Scenario Outline: A reports severity can be modified
|
8
|
-
Given I set environment variable "
|
9
|
-
|
10
|
-
And I
|
11
|
-
|
12
|
-
And I wait for 1 second
|
13
|
-
Then I should receive a request
|
14
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
15
|
-
And the request used payload v4 headers
|
16
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
4
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
5
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/modify_severity.rb"
|
6
|
+
And I wait to receive a request
|
7
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
17
8
|
And the event "severity" equals "info"
|
18
9
|
And the event "severityReason.type" equals "userCallbackSetSeverity"
|
19
10
|
|
20
11
|
Examples:
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| 2.0 | unhandled_before_notify |
|
28
|
-
| 2.1 | handled_before_notify |
|
29
|
-
| 2.1 | handled_block |
|
30
|
-
| 2.1 | unhandled_before_notify |
|
31
|
-
| 2.2 | handled_before_notify |
|
32
|
-
| 2.2 | handled_block |
|
33
|
-
| 2.2 | unhandled_before_notify |
|
34
|
-
| 2.3 | handled_before_notify |
|
35
|
-
| 2.3 | handled_block |
|
36
|
-
| 2.3 | unhandled_before_notify |
|
37
|
-
| 2.4 | handled_before_notify |
|
38
|
-
| 2.4 | handled_block |
|
39
|
-
| 2.4 | unhandled_before_notify |
|
40
|
-
| 2.5 | handled_before_notify |
|
41
|
-
| 2.5 | handled_block |
|
42
|
-
| 2.5 | unhandled_before_notify |
|
12
|
+
| initiator |
|
13
|
+
| handled_before_notify |
|
14
|
+
| handled_block |
|
15
|
+
| unhandled_before_notify |
|
16
|
+
| handled_on_error |
|
17
|
+
| unhandled_on_error |
|
@@ -1,72 +1,33 @@
|
|
1
1
|
Feature: Plain report modify stack frames
|
2
2
|
|
3
|
-
Background:
|
4
|
-
Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
5
|
-
And I configure the bugsnag endpoint
|
6
|
-
|
7
3
|
Scenario Outline: Stack frames can be removed
|
8
|
-
Given I set environment variable "
|
9
|
-
|
10
|
-
And I
|
11
|
-
|
12
|
-
And I wait for 1 second
|
13
|
-
Then I should receive a request
|
14
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
15
|
-
And the request used payload v4 headers
|
16
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
4
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
5
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb"
|
6
|
+
And I wait to receive a request
|
7
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
17
8
|
And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/<initiator>.rb"
|
18
9
|
And the "lineNumber" of stack frame 0 equals <lineNumber>
|
19
10
|
|
20
11
|
Examples:
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
| 2.4 | handled_before_notify | 20 |
|
33
|
-
| 2.4 | unhandled_before_notify | 21 |
|
34
|
-
| 2.5 | handled_before_notify | 20 |
|
35
|
-
| 2.5 | unhandled_before_notify | 21 |
|
36
|
-
|
37
|
-
Scenario Outline: Stack frames can be removed from a notified string
|
38
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby version>"
|
39
|
-
And I set environment variable "CALLBACK_INITIATOR" to "handled_block"
|
40
|
-
And I have built the service "plain-ruby"
|
41
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb"
|
42
|
-
And I wait for 1 second
|
43
|
-
Then I should receive a request
|
44
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
45
|
-
And the request used payload v4 headers
|
46
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
12
|
+
| initiator | lineNumber |
|
13
|
+
| handled_before_notify | 20 |
|
14
|
+
| unhandled_before_notify | 21 |
|
15
|
+
| handled_on_error | 20 |
|
16
|
+
| unhandled_on_error | 21 |
|
17
|
+
|
18
|
+
Scenario: Stack frames can be removed from a notified string
|
19
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "handled_block"
|
20
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb"
|
21
|
+
And I wait to receive a request
|
22
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
47
23
|
And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/handled_block.rb"
|
48
24
|
And the "lineNumber" of the top non-bugsnag stackframe equals 19
|
49
25
|
|
50
|
-
Examples:
|
51
|
-
| ruby version |
|
52
|
-
| 1.9.3 |
|
53
|
-
| 2.0 |
|
54
|
-
| 2.1 |
|
55
|
-
| 2.2 |
|
56
|
-
| 2.3 |
|
57
|
-
| 2.4 |
|
58
|
-
| 2.5 |
|
59
|
-
|
60
26
|
Scenario Outline: Stack frames can be marked as in project
|
61
|
-
Given I set environment variable "
|
62
|
-
|
63
|
-
And I
|
64
|
-
|
65
|
-
And I wait for 1 second
|
66
|
-
Then I should receive a request
|
67
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
68
|
-
And the request used payload v4 headers
|
69
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
27
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
28
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/mark_frames_in_project.rb"
|
29
|
+
And I wait to receive a request
|
30
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
70
31
|
And the "file" of stack frame 0 equals "/usr/src/app/stack_frame_modification/initiators/<initiator>.rb"
|
71
32
|
And the event "exceptions.0.stacktrace.0.inProject" is null
|
72
33
|
And the event "exceptions.0.stacktrace.1.inProject" is true
|
@@ -74,44 +35,19 @@ Scenario Outline: Stack frames can be marked as in project
|
|
74
35
|
And the event "exceptions.0.stacktrace.3.inProject" is true
|
75
36
|
|
76
37
|
Examples:
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
| 2.2 | unhandled_before_notify |
|
86
|
-
| 2.3 | handled_before_notify |
|
87
|
-
| 2.3 | unhandled_before_notify |
|
88
|
-
| 2.4 | handled_before_notify |
|
89
|
-
| 2.4 | unhandled_before_notify |
|
90
|
-
| 2.5 | handled_before_notify |
|
91
|
-
| 2.5 | unhandled_before_notify |
|
92
|
-
|
93
|
-
Scenario Outline: Stack frames can be marked as in project with a handled string
|
94
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby version>"
|
95
|
-
And I set environment variable "CALLBACK_INITIATOR" to "handled_block"
|
96
|
-
And I have built the service "plain-ruby"
|
38
|
+
| initiator |
|
39
|
+
| handled_before_notify |
|
40
|
+
| unhandled_before_notify |
|
41
|
+
| handled_on_error |
|
42
|
+
| unhandled_on_error |
|
43
|
+
|
44
|
+
Scenario: Stack frames can be marked as in project with a handled string
|
45
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "handled_block"
|
97
46
|
And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/mark_frames_in_project.rb"
|
98
|
-
And I wait
|
99
|
-
Then
|
100
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
101
|
-
And the request used payload v4 headers
|
102
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
47
|
+
And I wait to receive a request
|
48
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
103
49
|
And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/handled_block.rb"
|
104
50
|
And the event "exceptions.0.stacktrace.0.inProject" is null
|
105
51
|
And the event "exceptions.0.stacktrace.1.inProject" is true
|
106
52
|
And the event "exceptions.0.stacktrace.2.inProject" is true
|
107
53
|
And the event "exceptions.0.stacktrace.3.inProject" is true
|
108
|
-
|
109
|
-
Examples:
|
110
|
-
| ruby version |
|
111
|
-
| 1.9.3 |
|
112
|
-
| 2.0 |
|
113
|
-
| 2.1 |
|
114
|
-
| 2.2 |
|
115
|
-
| 2.3 |
|
116
|
-
| 2.4 |
|
117
|
-
| 2.5 |
|
@@ -1,118 +1,51 @@
|
|
1
1
|
Feature: Plain report modify user
|
2
2
|
|
3
|
-
Background:
|
4
|
-
Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
5
|
-
And I configure the bugsnag endpoint
|
6
|
-
|
7
3
|
Scenario Outline: A report can have a user name, email, and id set
|
8
|
-
Given I set environment variable "
|
9
|
-
|
10
|
-
And I
|
11
|
-
|
12
|
-
And I wait for 1 second
|
13
|
-
Then I should receive a request
|
14
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
15
|
-
And the request used payload v4 headers
|
16
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
4
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
5
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/set_user_details.rb"
|
6
|
+
And I wait to receive a request
|
7
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
17
8
|
And the event "user.name" equals "leo testman"
|
18
9
|
And the event "user.email" equals "test@test.com"
|
19
10
|
And the event "user.id" equals "0001"
|
20
11
|
|
21
12
|
Examples:
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| 2.0 | unhandled_before_notify |
|
29
|
-
| 2.1 | handled_before_notify |
|
30
|
-
| 2.1 | handled_block |
|
31
|
-
| 2.1 | unhandled_before_notify |
|
32
|
-
| 2.2 | handled_before_notify |
|
33
|
-
| 2.2 | handled_block |
|
34
|
-
| 2.2 | unhandled_before_notify |
|
35
|
-
| 2.3 | handled_before_notify |
|
36
|
-
| 2.3 | handled_block |
|
37
|
-
| 2.3 | unhandled_before_notify |
|
38
|
-
| 2.4 | handled_before_notify |
|
39
|
-
| 2.4 | handled_block |
|
40
|
-
| 2.4 | unhandled_before_notify |
|
41
|
-
| 2.5 | handled_before_notify |
|
42
|
-
| 2.5 | handled_block |
|
43
|
-
| 2.5 | unhandled_before_notify |
|
13
|
+
| initiator |
|
14
|
+
| handled_before_notify |
|
15
|
+
| handled_block |
|
16
|
+
| unhandled_before_notify |
|
17
|
+
| handled_on_error |
|
18
|
+
| unhandled_on_error |
|
44
19
|
|
45
20
|
Scenario Outline: A report can have custom info set
|
46
|
-
Given I set environment variable "
|
47
|
-
And I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
48
|
-
And I have built the service "plain-ruby"
|
21
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
49
22
|
And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/set_custom_user_details.rb"
|
50
|
-
And I wait
|
51
|
-
Then
|
52
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
53
|
-
And the request used payload v4 headers
|
54
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
23
|
+
And I wait to receive a request
|
24
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
55
25
|
And the event "user.type" equals "amateur"
|
56
26
|
And the event "user.location" equals "testville"
|
57
27
|
And the event "user.details.a" equals "foo"
|
58
28
|
And the event "user.details.b" equals "bar"
|
59
29
|
|
60
30
|
Examples:
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| 2.0 | unhandled_before_notify |
|
68
|
-
| 2.1 | handled_before_notify |
|
69
|
-
| 2.1 | handled_block |
|
70
|
-
| 2.1 | unhandled_before_notify |
|
71
|
-
| 2.2 | handled_before_notify |
|
72
|
-
| 2.2 | handled_block |
|
73
|
-
| 2.2 | unhandled_before_notify |
|
74
|
-
| 2.3 | handled_before_notify |
|
75
|
-
| 2.3 | handled_block |
|
76
|
-
| 2.3 | unhandled_before_notify |
|
77
|
-
| 2.4 | handled_before_notify |
|
78
|
-
| 2.4 | handled_block |
|
79
|
-
| 2.4 | unhandled_before_notify |
|
80
|
-
| 2.5 | handled_before_notify |
|
81
|
-
| 2.5 | handled_block |
|
82
|
-
| 2.5 | unhandled_before_notify |
|
31
|
+
| initiator |
|
32
|
+
| handled_before_notify |
|
33
|
+
| handled_block |
|
34
|
+
| unhandled_before_notify |
|
35
|
+
| handled_on_error |
|
36
|
+
| unhandled_on_error |
|
83
37
|
|
84
38
|
Scenario Outline: A report can have its user info removed
|
85
|
-
Given I set environment variable "
|
86
|
-
|
87
|
-
And I
|
88
|
-
|
89
|
-
And I wait for 1 second
|
90
|
-
Then I should receive a request
|
91
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
92
|
-
And the request used payload v4 headers
|
93
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
39
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
40
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/remove_user_details.rb"
|
41
|
+
And I wait to receive a request
|
42
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
94
43
|
And the event "user" is null
|
95
44
|
|
96
45
|
Examples:
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
| 2.0 | unhandled_before_notify |
|
104
|
-
| 2.1 | handled_before_notify |
|
105
|
-
| 2.1 | handled_block |
|
106
|
-
| 2.1 | unhandled_before_notify |
|
107
|
-
| 2.2 | handled_before_notify |
|
108
|
-
| 2.2 | handled_block |
|
109
|
-
| 2.2 | unhandled_before_notify |
|
110
|
-
| 2.3 | handled_before_notify |
|
111
|
-
| 2.3 | handled_block |
|
112
|
-
| 2.3 | unhandled_before_notify |
|
113
|
-
| 2.4 | handled_before_notify |
|
114
|
-
| 2.4 | handled_block |
|
115
|
-
| 2.4 | unhandled_before_notify |
|
116
|
-
| 2.5 | handled_before_notify |
|
117
|
-
| 2.5 | handled_block |
|
118
|
-
| 2.5 | unhandled_before_notify |
|
46
|
+
| initiator |
|
47
|
+
| handled_before_notify |
|
48
|
+
| handled_block |
|
49
|
+
| unhandled_before_notify |
|
50
|
+
| handled_on_error |
|
51
|
+
| unhandled_on_error |
|