bugsnag 6.12.0 → 6.14.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 +67 -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 +28 -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/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 +3 -2
- data/features/fixtures/rails4/Dockerfile +2 -5
- data/features/fixtures/rails4/app/config/initializers/bugsnag.rb +2 -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 +2 -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 +2 -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 +24 -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 +6 -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 +9 -35
- data/features/plain_features/report_severity.feature +8 -35
- data/features/plain_features/report_stack_frames.feature +24 -92
- data/features/plain_features/report_user.feature +23 -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/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 +74 -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/configuration.rb +31 -2
- data/lib/bugsnag/helpers.rb +2 -4
- data/lib/bugsnag/integrations/que.rb +7 -4
- data/lib/bugsnag/integrations/railtie.rb +1 -1
- 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/report.rb +3 -13
- data/lib/bugsnag/stacktrace.rb +6 -10
- 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/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/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/report_spec.rb +324 -26
- data/spec/spec_helper.rb +6 -1
- data/spec/stacktrace_spec.rb +179 -72
- metadata +23 -7
- data/.travis.yml +0 -117
- data/features/plain_features/api_key.feature +0 -25
@@ -0,0 +1,14 @@
|
|
1
|
+
namespace :sidekiq_tests do
|
2
|
+
task :handled_error do
|
3
|
+
run_sidekiq_test('./initializers/HandledError.rb')
|
4
|
+
end
|
5
|
+
|
6
|
+
task :unhandled_error do
|
7
|
+
run_sidekiq_test('./initializers/UnhandledError.rb')
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def run_sidekiq_test(command)
|
12
|
+
system("ruby #{command}")
|
13
|
+
system("sidekiq -r ./app.rb")
|
14
|
+
end
|
@@ -1,58 +1,26 @@
|
|
1
1
|
Feature: Plain add tab to metadata
|
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: Metadata can be added to a report using add_tab
|
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/add_tab.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 "metaData.additional_metadata.foo" equals "foo"
|
18
9
|
And the event "metaData.additional_metadata.bar.0" equals "b"
|
19
10
|
And the event "metaData.additional_metadata.bar.1" equals "a"
|
20
11
|
And the event "metaData.additional_metadata.bar.2" equals "r"
|
21
12
|
|
22
13
|
Examples:
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| 2.0 | handled_before_notify |
|
28
|
-
| 2.0 | handled_block |
|
29
|
-
| 2.0 | unhandled_before_notify |
|
30
|
-
| 2.1 | handled_before_notify |
|
31
|
-
| 2.1 | handled_block |
|
32
|
-
| 2.1 | unhandled_before_notify |
|
33
|
-
| 2.2 | handled_before_notify |
|
34
|
-
| 2.2 | handled_block |
|
35
|
-
| 2.2 | unhandled_before_notify |
|
36
|
-
| 2.3 | handled_before_notify |
|
37
|
-
| 2.3 | handled_block |
|
38
|
-
| 2.3 | unhandled_before_notify |
|
39
|
-
| 2.4 | handled_before_notify |
|
40
|
-
| 2.4 | handled_block |
|
41
|
-
| 2.4 | unhandled_before_notify |
|
42
|
-
| 2.5 | handled_before_notify |
|
43
|
-
| 2.5 | handled_block |
|
44
|
-
| 2.5 | unhandled_before_notify |
|
14
|
+
| initiator |
|
15
|
+
| handled_before_notify |
|
16
|
+
| handled_block |
|
17
|
+
| unhandled_before_notify |
|
45
18
|
|
46
19
|
Scenario Outline: Metadata can be added to an existing tab using add_tab
|
47
|
-
Given I set environment variable "
|
48
|
-
|
49
|
-
And I
|
50
|
-
|
51
|
-
And I wait for 1 second
|
52
|
-
Then I should receive a request
|
53
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
54
|
-
And the request used payload v4 headers
|
55
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
20
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
21
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/add_tab_existing.rb"
|
22
|
+
And I wait to receive a request
|
23
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
56
24
|
And the event "metaData.additional_metadata.foo" equals "foo"
|
57
25
|
And the event "metaData.additional_metadata.bar.0" equals "b"
|
58
26
|
And the event "metaData.additional_metadata.bar.1" equals "a"
|
@@ -61,62 +29,21 @@ Scenario Outline: Metadata can be added to an existing tab using add_tab
|
|
61
29
|
And the event "metaData.additional_metadata.foobar.then" equals "bar"
|
62
30
|
|
63
31
|
Examples:
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| 2.0 | handled_before_notify |
|
69
|
-
| 2.0 | handled_block |
|
70
|
-
| 2.0 | unhandled_before_notify |
|
71
|
-
| 2.1 | handled_before_notify |
|
72
|
-
| 2.1 | handled_block |
|
73
|
-
| 2.1 | unhandled_before_notify |
|
74
|
-
| 2.2 | handled_before_notify |
|
75
|
-
| 2.2 | handled_block |
|
76
|
-
| 2.2 | unhandled_before_notify |
|
77
|
-
| 2.3 | handled_before_notify |
|
78
|
-
| 2.3 | handled_block |
|
79
|
-
| 2.3 | unhandled_before_notify |
|
80
|
-
| 2.4 | handled_before_notify |
|
81
|
-
| 2.4 | handled_block |
|
82
|
-
| 2.4 | unhandled_before_notify |
|
83
|
-
| 2.5 | handled_before_notify |
|
84
|
-
| 2.5 | handled_block |
|
85
|
-
| 2.5 | unhandled_before_notify |
|
32
|
+
| initiator |
|
33
|
+
| handled_before_notify |
|
34
|
+
| handled_block |
|
35
|
+
| unhandled_before_notify |
|
86
36
|
|
87
37
|
Scenario Outline: Metadata can be overwritten using add_tab
|
88
|
-
Given I set environment variable "
|
89
|
-
|
90
|
-
And I
|
91
|
-
|
92
|
-
And I wait for 1 second
|
93
|
-
Then I should receive a request
|
94
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
95
|
-
And the request used payload v4 headers
|
96
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
38
|
+
Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
|
39
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/add_tab_override.rb"
|
40
|
+
And I wait to receive a request
|
41
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
97
42
|
And the event "metaData.additional_metadata.foo" equals "foo"
|
98
43
|
And the event "metaData.additional_metadata.bar" equals "bar"
|
99
44
|
|
100
45
|
Examples:
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
| 2.0 | handled_before_notify |
|
106
|
-
| 2.0 | handled_block |
|
107
|
-
| 2.0 | unhandled_before_notify |
|
108
|
-
| 2.1 | handled_before_notify |
|
109
|
-
| 2.1 | handled_block |
|
110
|
-
| 2.1 | unhandled_before_notify |
|
111
|
-
| 2.2 | handled_before_notify |
|
112
|
-
| 2.2 | handled_block |
|
113
|
-
| 2.2 | unhandled_before_notify |
|
114
|
-
| 2.3 | handled_before_notify |
|
115
|
-
| 2.3 | handled_block |
|
116
|
-
| 2.3 | unhandled_before_notify |
|
117
|
-
| 2.4 | handled_before_notify |
|
118
|
-
| 2.4 | handled_block |
|
119
|
-
| 2.4 | unhandled_before_notify |
|
120
|
-
| 2.5 | handled_before_notify |
|
121
|
-
| 2.5 | handled_block |
|
122
|
-
| 2.5 | unhandled_before_notify |
|
46
|
+
| initiator |
|
47
|
+
| handled_before_notify |
|
48
|
+
| handled_block |
|
49
|
+
| unhandled_before_notify |
|
@@ -1,27 +1,8 @@
|
|
1
1
|
Feature: App type configuration option
|
2
2
|
|
3
|
-
|
4
|
-
Given I set environment variable "
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
And I set environment variable "BUGSNAG_APP_TYPE" to "test_app"
|
10
|
-
And I have built the service "plain-ruby"
|
11
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_handled.rb"
|
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"
|
17
|
-
And the event "app.type" equals "test_app"
|
18
|
-
|
19
|
-
Examples:
|
20
|
-
| ruby version |
|
21
|
-
| 1.9.3 |
|
22
|
-
| 2.0 |
|
23
|
-
| 2.1 |
|
24
|
-
| 2.2 |
|
25
|
-
| 2.3 |
|
26
|
-
| 2.4 |
|
27
|
-
| 2.5 |
|
3
|
+
Scenario: The App type configuration option can be set
|
4
|
+
Given I set environment variable "BUGSNAG_APP_TYPE" to "test_app"
|
5
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_handled.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"
|
8
|
+
And the event "app.type" equals "test_app"
|
@@ -1,27 +1,8 @@
|
|
1
1
|
Feature: App version configuration option
|
2
2
|
|
3
|
-
|
4
|
-
Given I set environment variable "
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
And I set environment variable "BUGSNAG_APP_VERSION" to "9.9.8"
|
10
|
-
And I have built the service "plain-ruby"
|
11
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_handled.rb"
|
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"
|
17
|
-
And the event "app.version" equals "9.9.8"
|
18
|
-
|
19
|
-
Examples:
|
20
|
-
| ruby version |
|
21
|
-
| 1.9.3 |
|
22
|
-
| 2.0 |
|
23
|
-
| 2.1 |
|
24
|
-
| 2.2 |
|
25
|
-
| 2.3 |
|
26
|
-
| 2.4 |
|
27
|
-
| 2.5 |
|
3
|
+
Scenario: The App version configuration option can be set
|
4
|
+
Given I set environment variable "BUGSNAG_APP_VERSION" to "9.9.8"
|
5
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_handled.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"
|
8
|
+
And the event "app.version" equals "9.9.8"
|
@@ -1,23 +1,7 @@
|
|
1
1
|
Feature: Auto notify configuration option
|
2
2
|
|
3
|
-
|
4
|
-
Given I set environment variable "
|
5
|
-
|
6
|
-
|
7
|
-
Scenario Outline: When Auto-notify is false notifications are not sent
|
8
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby version>"
|
9
|
-
And I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
|
10
|
-
And I have built the service "plain-ruby"
|
11
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb"
|
3
|
+
Scenario: When Auto-notify is false notifications are not sent
|
4
|
+
Given I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
|
5
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb"
|
12
6
|
And I wait for 1 second
|
13
|
-
Then I should receive
|
14
|
-
|
15
|
-
Examples:
|
16
|
-
| ruby version |
|
17
|
-
| 1.9.3 |
|
18
|
-
| 2.0 |
|
19
|
-
| 2.1 |
|
20
|
-
| 2.2 |
|
21
|
-
| 2.3 |
|
22
|
-
| 2.4 |
|
23
|
-
| 2.5 |
|
7
|
+
Then I should receive no requests
|
@@ -1,68 +1,20 @@
|
|
1
1
|
Feature: delivery_method configuration option
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
And I
|
6
|
-
|
7
|
-
Scenario Outline: When the delivery_method is set to :synchronous
|
8
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby version>"
|
9
|
-
And I have built the service "plain-ruby"
|
10
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby delivery/synchronous.rb"
|
11
|
-
And I wait for 1 second
|
12
|
-
Then I should receive a request
|
13
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
14
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
15
|
-
And the exception "errorClass" equals "RuntimeError"
|
3
|
+
Scenario: When the delivery_method is set to :synchronous
|
4
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby delivery/synchronous.rb"
|
5
|
+
And I wait to receive a request
|
6
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
16
7
|
And the event "metaData.config" matches the JSON fixture in "features/fixtures/plain/json/delivery_synchronous.json"
|
17
8
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
| 2.1 |
|
23
|
-
| 2.2 |
|
24
|
-
| 2.3 |
|
25
|
-
| 2.4 |
|
26
|
-
| 2.5 |
|
27
|
-
|
28
|
-
Scenario Outline: When the delivery_method is set to :thread_queue
|
29
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby version>"
|
30
|
-
And I have built the service "plain-ruby"
|
31
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby delivery/threadpool.rb"
|
32
|
-
And I wait for 1 second
|
33
|
-
Then I should receive a request
|
34
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
35
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
36
|
-
And the exception "errorClass" equals "RuntimeError"
|
9
|
+
Scenario: When the delivery_method is set to :thread_queue
|
10
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby delivery/threadpool.rb"
|
11
|
+
And I wait to receive a request
|
12
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
37
13
|
And the event "metaData.config" matches the JSON fixture in "features/fixtures/plain/json/delivery_threadpool.json"
|
38
14
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
| 2.1 |
|
44
|
-
| 2.2 |
|
45
|
-
| 2.3 |
|
46
|
-
| 2.4 |
|
47
|
-
| 2.5 |
|
48
|
-
|
49
|
-
Scenario Outline: When the delivery_method is set to :thread_queue in a fork
|
50
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby version>"
|
51
|
-
And I have built the service "plain-ruby"
|
52
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby delivery/fork_threadpool.rb"
|
53
|
-
And I wait for 1 second
|
54
|
-
Then I should receive 2 requests
|
55
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
56
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
15
|
+
Scenario: When the delivery_method is set to :thread_queue in a fork
|
16
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby delivery/fork_threadpool.rb"
|
17
|
+
And I wait to receive 2 requests
|
18
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
57
19
|
And the exception "errorClass" equals "RuntimeError"
|
58
20
|
And the event "metaData.config" matches the JSON fixture in "features/fixtures/plain/json/delivery_fork.json"
|
59
|
-
|
60
|
-
Examples:
|
61
|
-
| ruby version |
|
62
|
-
| 1.9.3 |
|
63
|
-
| 2.0 |
|
64
|
-
| 2.1 |
|
65
|
-
| 2.2 |
|
66
|
-
| 2.3 |
|
67
|
-
| 2.4 |
|
68
|
-
| 2.5 |
|
@@ -1,120 +1,50 @@
|
|
1
1
|
Feature: Plain exception data
|
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: An error has built in meta-data
|
8
|
-
|
9
|
-
And I
|
10
|
-
|
11
|
-
And I wait for 1 second
|
12
|
-
Then I should receive a request
|
13
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
14
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
4
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby exception_data/<state>_meta_data.rb"
|
5
|
+
And I wait to receive a request
|
6
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
15
7
|
And the exception "errorClass" equals "CustomError"
|
16
8
|
And the event "metaData.exception.exception_type" equals "FATAL"
|
17
9
|
And the event "metaData.exception.exception_base" equals "RuntimeError"
|
18
10
|
|
19
11
|
Examples:
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| 2.0 | unhandled |
|
24
|
-
| 2.0 | handled |
|
25
|
-
| 2.1 | unhandled |
|
26
|
-
| 2.1 | handled |
|
27
|
-
| 2.2 | unhandled |
|
28
|
-
| 2.2 | handled |
|
29
|
-
| 2.3 | unhandled |
|
30
|
-
| 2.3 | handled |
|
31
|
-
| 2.4 | unhandled |
|
32
|
-
| 2.4 | handled |
|
33
|
-
| 2.5 | unhandled |
|
34
|
-
| 2.5 | handled |
|
12
|
+
| state |
|
13
|
+
| unhandled |
|
14
|
+
| handled |
|
35
15
|
|
36
16
|
Scenario Outline: An error has built in context
|
37
|
-
|
38
|
-
And I
|
39
|
-
|
40
|
-
And I wait for 1 second
|
41
|
-
Then I should receive a request
|
42
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
43
|
-
And the request used payload v4 headers
|
44
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
17
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby exception_data/<state>_context.rb"
|
18
|
+
And I wait to receive a request
|
19
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
45
20
|
And the exception "errorClass" equals "CustomError"
|
46
21
|
And the event "context" equals "IntegrationTests"
|
47
22
|
|
48
23
|
Examples:
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
| 2.0 | unhandled |
|
53
|
-
| 2.0 | handled |
|
54
|
-
| 2.1 | unhandled |
|
55
|
-
| 2.1 | handled |
|
56
|
-
| 2.2 | unhandled |
|
57
|
-
| 2.2 | handled |
|
58
|
-
| 2.3 | unhandled |
|
59
|
-
| 2.3 | handled |
|
60
|
-
| 2.4 | unhandled |
|
61
|
-
| 2.4 | handled |
|
62
|
-
| 2.5 | unhandled |
|
63
|
-
| 2.5 | handled |
|
24
|
+
| state |
|
25
|
+
| unhandled |
|
26
|
+
| handled |
|
64
27
|
|
65
28
|
Scenario Outline: An error has built in grouping hash
|
66
|
-
|
67
|
-
And I
|
68
|
-
|
69
|
-
And I wait for 1 second
|
70
|
-
Then I should receive a request
|
71
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
72
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
29
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby exception_data/<state>_hash.rb"
|
30
|
+
And I wait to receive a request
|
31
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
73
32
|
And the exception "errorClass" equals "CustomError"
|
74
33
|
And the event "groupingHash" equals "ABCDE12345"
|
75
34
|
|
76
35
|
Examples:
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| 2.0 | unhandled |
|
81
|
-
| 2.0 | handled |
|
82
|
-
| 2.1 | unhandled |
|
83
|
-
| 2.1 | handled |
|
84
|
-
| 2.2 | unhandled |
|
85
|
-
| 2.2 | handled |
|
86
|
-
| 2.3 | unhandled |
|
87
|
-
| 2.3 | handled |
|
88
|
-
| 2.4 | unhandled |
|
89
|
-
| 2.4 | handled |
|
90
|
-
| 2.5 | unhandled |
|
91
|
-
| 2.5 | handled |
|
36
|
+
| state |
|
37
|
+
| unhandled |
|
38
|
+
| handled |
|
92
39
|
|
93
40
|
Scenario Outline: An error has built in user id
|
94
|
-
|
95
|
-
And I
|
96
|
-
|
97
|
-
And I wait for 1 second
|
98
|
-
Then I should receive a request
|
99
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
100
|
-
And the request used payload v4 headers
|
101
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
41
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby exception_data/<state>_user_id.rb"
|
42
|
+
And I wait to receive a request
|
43
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
102
44
|
And the exception "errorClass" equals "CustomError"
|
103
45
|
And the event "user.id" equals "000001"
|
104
46
|
|
105
47
|
Examples:
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
| 2.0 | unhandled |
|
110
|
-
| 2.0 | handled |
|
111
|
-
| 2.1 | unhandled |
|
112
|
-
| 2.1 | handled |
|
113
|
-
| 2.2 | unhandled |
|
114
|
-
| 2.2 | handled |
|
115
|
-
| 2.3 | unhandled |
|
116
|
-
| 2.3 | handled |
|
117
|
-
| 2.4 | unhandled |
|
118
|
-
| 2.4 | handled |
|
119
|
-
| 2.5 | unhandled |
|
120
|
-
| 2.5 | handled |
|
48
|
+
| state |
|
49
|
+
| unhandled |
|
50
|
+
| handled |
|