bugsnag 6.12.1 → 6.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/pipeline.yml +470 -0
  3. data/.rubocop.yml +55 -0
  4. data/.rubocop_todo.yml +530 -160
  5. data/CHANGELOG.md +73 -0
  6. data/CONTRIBUTING.md +1 -9
  7. data/Gemfile +14 -7
  8. data/TESTING.md +81 -0
  9. data/VERSION +1 -1
  10. data/docker-compose.yml +46 -0
  11. data/dockerfiles/Dockerfile.jruby-unit-tests +13 -0
  12. data/dockerfiles/Dockerfile.ruby-maze-runner +26 -0
  13. data/dockerfiles/Dockerfile.ruby-unit-tests +12 -0
  14. data/features/delayed_job.feature +6 -22
  15. data/features/fixtures/delayed_job/Dockerfile +2 -4
  16. data/features/fixtures/delayed_job/app/Gemfile +1 -1
  17. data/features/fixtures/delayed_job/app/Rakefile +18 -0
  18. data/features/fixtures/docker-compose.yml +32 -40
  19. data/features/fixtures/expected_breadcrumbs/active_job.json +9 -0
  20. data/features/fixtures/expected_breadcrumbs/mongo_failed.json +15 -0
  21. data/features/fixtures/expected_breadcrumbs/mongo_filtered_request.json +15 -0
  22. data/features/fixtures/expected_breadcrumbs/mongo_filtered_result.json +15 -0
  23. data/features/fixtures/expected_breadcrumbs/mongo_success.json +14 -0
  24. data/features/fixtures/expected_breadcrumbs/request.json +13 -0
  25. data/features/fixtures/expected_breadcrumbs/sql_with_bindings.json +12 -0
  26. data/features/fixtures/expected_breadcrumbs/sql_without_bindings.json +11 -0
  27. data/features/fixtures/plain/Dockerfile +2 -2
  28. data/features/fixtures/plain/app/app.rb +1 -3
  29. data/features/fixtures/plain/app/delivery/fork_threadpool.rb +3 -1
  30. data/features/fixtures/plain/app/report_modification/initiators/handled_on_error.rb +10 -0
  31. data/features/fixtures/plain/app/report_modification/initiators/unhandled_on_error.rb +11 -0
  32. data/features/fixtures/plain/app/stack_frame_modification/initiators/handled_on_error.rb +29 -0
  33. data/features/fixtures/plain/app/stack_frame_modification/initiators/unhandled_on_error.rb +26 -0
  34. data/features/fixtures/plain/app/unhandled/{Interrupt.rb → interrupt.rb} +0 -0
  35. data/features/fixtures/rack1/Dockerfile +2 -2
  36. data/features/fixtures/rack2/Dockerfile +2 -2
  37. data/features/fixtures/rails3/Dockerfile +2 -2
  38. data/features/fixtures/rails3/app/Gemfile +4 -0
  39. data/features/fixtures/rails3/app/config/initializers/bugsnag.rb +11 -2
  40. data/features/fixtures/rails4/Dockerfile +2 -5
  41. data/features/fixtures/rails4/app/config/initializers/bugsnag.rb +10 -1
  42. data/features/fixtures/rails5/Dockerfile +2 -2
  43. data/features/fixtures/rails5/app/Gemfile +3 -2
  44. data/features/fixtures/rails5/app/config/initializers/bugsnag.rb +10 -1
  45. data/features/fixtures/rails6/Dockerfile +2 -2
  46. data/features/fixtures/rails6/app/Gemfile +3 -2
  47. data/features/fixtures/rails6/app/app/controllers/mongo_controller.rb +22 -0
  48. data/features/fixtures/rails6/app/app/models/mongo_model.rb +6 -0
  49. data/features/fixtures/rails6/app/config/environments/development.rb +2 -0
  50. data/features/fixtures/rails6/app/config/environments/production.rb +1 -0
  51. data/features/fixtures/rails6/app/config/environments/rails_env.rb +1 -0
  52. data/features/fixtures/rails6/app/config/environments/test.rb +1 -0
  53. data/features/fixtures/rails6/app/config/initializers/bugsnag.rb +10 -1
  54. data/features/fixtures/rails6/app/config/mongoid.yml +23 -0
  55. data/features/fixtures/rails6/app/config/routes.rb +4 -0
  56. data/features/fixtures/resque/Dockerfile +2 -2
  57. data/features/fixtures/sidekiq/Dockerfile +5 -7
  58. data/features/fixtures/sidekiq/app/Gemfile +2 -1
  59. data/features/fixtures/sidekiq/app/Rakefile.rb +14 -0
  60. data/features/fixtures/sinatra1/Dockerfile +2 -2
  61. data/features/fixtures/sinatra2/Dockerfile +2 -2
  62. data/features/plain_features/add_tab.feature +30 -97
  63. data/features/plain_features/app_type.feature +6 -25
  64. data/features/plain_features/app_version.feature +6 -25
  65. data/features/plain_features/auto_notify.feature +4 -20
  66. data/features/plain_features/delivery.feature +12 -60
  67. data/features/plain_features/exception_data.feature +24 -94
  68. data/features/plain_features/filters.feature +9 -43
  69. data/features/plain_features/handled_errors.feature +16 -78
  70. data/features/plain_features/ignore_classes.feature +5 -23
  71. data/features/plain_features/ignore_report.feature +8 -24
  72. data/features/plain_features/proxies.feature +13 -56
  73. data/features/plain_features/release_stages.feature +9 -40
  74. data/features/plain_features/report_api_key.feature +11 -35
  75. data/features/plain_features/report_severity.feature +10 -35
  76. data/features/plain_features/report_stack_frames.feature +29 -93
  77. data/features/plain_features/report_user.feature +29 -96
  78. data/features/plain_features/unhandled_errors.feature +17 -88
  79. data/features/rails_features/api_key.feature +12 -58
  80. data/features/rails_features/app_type.feature +13 -58
  81. data/features/rails_features/app_version.feature +19 -80
  82. data/features/rails_features/auto_capture_sessions.feature +31 -112
  83. data/features/rails_features/auto_notify.feature +28 -105
  84. data/features/rails_features/before_notify.feature +18 -83
  85. data/features/rails_features/breadcrumbs.feature +40 -137
  86. data/features/rails_features/handled.feature +18 -82
  87. data/features/rails_features/ignore_classes.feature +12 -51
  88. data/features/rails_features/meta_data_filters.feature +9 -33
  89. data/features/rails_features/mongo_breadcrumbs.feature +22 -96
  90. data/features/rails_features/on_error.feature +29 -0
  91. data/features/rails_features/project_root.feature +19 -84
  92. data/features/rails_features/release_stage.feature +20 -82
  93. data/features/rails_features/send_code.feature +13 -55
  94. data/features/rails_features/send_environment.feature +7 -33
  95. data/features/rails_features/unhandled.feature +6 -31
  96. data/features/rails_features/user_info.feature +27 -65
  97. data/features/sidekiq.feature +12 -79
  98. data/features/steps/ruby_notifier_steps.rb +59 -15
  99. data/features/support/env.rb +12 -45
  100. data/lib/bugsnag.rb +109 -21
  101. data/lib/bugsnag/breadcrumbs/breadcrumbs.rb +0 -2
  102. data/lib/bugsnag/breadcrumbs/validator.rb +0 -6
  103. data/lib/bugsnag/cleaner.rb +129 -60
  104. data/lib/bugsnag/code_extractor.rb +137 -0
  105. data/lib/bugsnag/configuration.rb +58 -1
  106. data/lib/bugsnag/helpers.rb +2 -4
  107. data/lib/bugsnag/integrations/que.rb +7 -4
  108. data/lib/bugsnag/middleware/discard_error_class.rb +30 -0
  109. data/lib/bugsnag/middleware/exception_meta_data.rb +15 -9
  110. data/lib/bugsnag/middleware/ignore_error_class.rb +2 -0
  111. data/lib/bugsnag/middleware/rack_request.rb +2 -4
  112. data/lib/bugsnag/middleware_stack.rb +38 -3
  113. data/lib/bugsnag/on_error_callbacks.rb +33 -0
  114. data/lib/bugsnag/report.rb +4 -14
  115. data/lib/bugsnag/session_tracker.rb +3 -3
  116. data/lib/bugsnag/stacktrace.rb +28 -75
  117. data/spec/breadcrumbs/breadcrumb_spec.rb +1 -1
  118. data/spec/breadcrumbs/validator_spec.rb +1 -26
  119. data/spec/bugsnag_spec.rb +2 -2
  120. data/spec/cleaner_spec.rb +202 -10
  121. data/spec/code_extractor_spec.rb +129 -0
  122. data/spec/configuration_spec.rb +16 -1
  123. data/spec/fixtures/apps/rails-initializer-config/Gemfile +5 -1
  124. data/spec/fixtures/apps/rails-invalid-initializer-config/Gemfile +5 -1
  125. data/spec/fixtures/apps/rails-no-config/Gemfile +5 -1
  126. data/spec/fixtures/crashes/file1.rb +29 -0
  127. data/spec/fixtures/crashes/file2.rb +25 -0
  128. data/spec/fixtures/crashes/file_with_long_lines.rb +7 -0
  129. data/spec/fixtures/crashes/functions.rb +29 -0
  130. data/spec/fixtures/crashes/short_file.rb +2 -0
  131. data/spec/helper_spec.rb +0 -31
  132. data/spec/integrations/logger_spec.rb +1 -1
  133. data/spec/integrations/rack_spec.rb +8 -6
  134. data/spec/integrations/rake_spec.rb +1 -1
  135. data/spec/on_error_spec.rb +332 -0
  136. data/spec/report_spec.rb +331 -30
  137. data/spec/spec_helper.rb +14 -1
  138. data/spec/stacktrace_spec.rb +427 -74
  139. metadata +36 -7
  140. data/.travis.yml +0 -117
  141. data/features/plain_features/api_key.feature +0 -25
@@ -1,118 +1,41 @@
1
1
  Feature: Auto notify
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I set environment variable "APP_PATH" to "/usr/src"
6
- And I configure the bugsnag endpoint
7
-
8
- Scenario Outline: Auto_notify set to false in the initializer prevents unhandled error sending
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
11
- And I start the service "rails<rails_version>"
12
- And I wait for the app to respond on port "6128<rails_version>"
13
- When I navigate to the route "/auto_notify/unhandled" on port "6128<rails_version>"
14
- Then I should receive 0 requests
15
-
16
- Examples:
17
- | ruby_version | rails_version |
18
- | 2.0 | 3 |
19
- | 2.1 | 3 |
20
- | 2.2 | 3 |
21
- | 2.2 | 4 |
22
- | 2.2 | 5 |
23
- | 2.3 | 3 |
24
- | 2.3 | 4 |
25
- | 2.3 | 5 |
26
- | 2.4 | 3 |
27
- | 2.4 | 5 |
28
- | 2.5 | 3 |
29
- | 2.5 | 5 |
30
- | 2.5 | 6 |
31
-
32
- Scenario Outline: Auto_notify set to false in the initializer still sends handled errors
33
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
34
- And I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
35
- And I start the service "rails<rails_version>"
36
- And I wait for the app to respond on port "6128<rails_version>"
37
- When I navigate to the route "/auto_notify/handled" on port "6128<rails_version>"
38
- Then I should receive a request
39
- And the request is a valid for the error reporting API
40
- And the request used the "Ruby Bugsnag Notifier" notifier
41
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
42
- And the payload field "events" is an array with 1 element
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Auto_notify set to false in the initializer prevents unhandled error sending
5
+ Given I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
6
+ And I start the rails service
7
+ When I navigate to the route "/auto_notify/unhandled" on the rails app
8
+ And I wait for 3 seconds
9
+ Then I should receive no requests
10
+
11
+ @rails3 @rails4 @rails5 @rails6
12
+ Scenario: Auto_notify set to false in the initializer still sends handled errors
13
+ Given I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
14
+ And I start the rails service
15
+ When I navigate to the route "/auto_notify/handled" on the rails app
16
+ And I wait to receive a request
17
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
43
18
  And the event "unhandled" is false
44
19
  And the exception "errorClass" equals "RuntimeError"
45
20
  And the exception "message" starts with "handled string"
46
21
  And the event "app.type" equals "rails"
47
22
  And the event "metaData.request.url" ends with "/auto_notify/handled"
48
23
 
49
- Examples:
50
- | ruby_version | rails_version |
51
- | 2.0 | 3 |
52
- | 2.1 | 3 |
53
- | 2.2 | 3 |
54
- | 2.2 | 4 |
55
- | 2.2 | 5 |
56
- | 2.3 | 3 |
57
- | 2.3 | 4 |
58
- | 2.3 | 5 |
59
- | 2.4 | 3 |
60
- | 2.4 | 5 |
61
- | 2.5 | 3 |
62
- | 2.5 | 5 |
63
- | 2.5 | 6 |
64
-
65
- Scenario Outline: Auto_notify set to false after the initializer prevents unhandled error sending
66
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
67
- And I start the service "rails<rails_version>"
68
- And I wait for the app to respond on port "6128<rails_version>"
69
- When I navigate to the route "/auto_notify/unhandled_after" on port "6128<rails_version>"
70
- Then I should receive 0 requests
71
-
72
- Examples:
73
- | ruby_version | rails_version |
74
- | 2.0 | 3 |
75
- | 2.1 | 3 |
76
- | 2.2 | 3 |
77
- | 2.2 | 4 |
78
- | 2.2 | 5 |
79
- | 2.3 | 3 |
80
- | 2.3 | 4 |
81
- | 2.3 | 5 |
82
- | 2.4 | 3 |
83
- | 2.4 | 5 |
84
- | 2.5 | 3 |
85
- | 2.5 | 5 |
86
- | 2.5 | 6 |
87
-
88
- Scenario Outline: Auto_notify set to false after the initializer still sends handled errors
89
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
90
- And I start the service "rails<rails_version>"
91
- And I wait for the app to respond on port "6128<rails_version>"
92
- When I navigate to the route "/auto_notify/handled_after" on port "6128<rails_version>"
93
- Then I should receive a request
94
- And the request is a valid for the error reporting API
95
- And the request used the "Ruby Bugsnag Notifier" notifier
96
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
97
- And the payload field "events" is an array with 1 element
24
+ @rails3 @rails4 @rails5 @rails6
25
+ Scenario: Auto_notify set to false after the initializer prevents unhandled error sending
26
+ Given I start the rails service
27
+ When I navigate to the route "/auto_notify/unhandled_after" on the rails app
28
+ And I wait for 3 seconds
29
+ Then I should receive no requests
30
+
31
+ @rails3 @rails4 @rails5 @rails6
32
+ Scenario: Auto_notify set to false after the initializer still sends handled errors
33
+ Given I start the rails service
34
+ When I navigate to the route "/auto_notify/handled_after" on the rails app
35
+ And I wait to receive a request
36
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
98
37
  And the exception "errorClass" equals "RuntimeError"
99
38
  And the exception "message" starts with "handled string"
100
39
  And the event "unhandled" is false
101
40
  And the event "metaData.request.url" ends with "/auto_notify/handled_after"
102
41
  And the event "app.type" equals "rails"
103
-
104
- Examples:
105
- | ruby_version | rails_version |
106
- | 2.0 | 3 |
107
- | 2.1 | 3 |
108
- | 2.2 | 3 |
109
- | 2.2 | 4 |
110
- | 2.2 | 5 |
111
- | 2.3 | 3 |
112
- | 2.3 | 4 |
113
- | 2.3 | 5 |
114
- | 2.4 | 3 |
115
- | 2.4 | 5 |
116
- | 2.5 | 3 |
117
- | 2.5 | 5 |
118
- | 2.5 | 6 |
@@ -1,20 +1,11 @@
1
1
  Feature: Before notify callbacks
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I set environment variable "APP_PATH" to "/usr/src"
6
- And I configure the bugsnag endpoint
7
-
8
- Scenario Outline: Rails before_notify controller method works on handled errors
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I start the service "rails<rails_version>"
11
- And I wait for the app to respond on port "6128<rails_version>"
12
- When I navigate to the route "/before_notify/handled" on port "6128<rails_version>"
13
- Then I should receive a request
14
- And the request is a valid for the error reporting API
15
- And the request used the "Ruby Bugsnag Notifier" notifier
16
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
17
- And the payload field "events" is an array with 1 element
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Rails before_notify controller method works on handled errors
5
+ Given I start the rails service
6
+ When I navigate to the route "/before_notify/handled" on the rails app
7
+ And I wait to receive a request
8
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
18
9
  And the exception "errorClass" equals "RuntimeError"
19
10
  And the exception "message" starts with "handled string"
20
11
  And the event "unhandled" is false
@@ -23,32 +14,12 @@ Scenario Outline: Rails before_notify controller method works on handled errors
23
14
  And the event "metaData.before_notify.source" equals "rails_before_handled"
24
15
  And the event "metaData.controller.name" equals "BeforeNotifyController"
25
16
 
26
- Examples:
27
- | ruby_version | rails_version |
28
- | 2.0 | 3 |
29
- | 2.1 | 3 |
30
- | 2.2 | 3 |
31
- | 2.2 | 4 |
32
- | 2.2 | 5 |
33
- | 2.3 | 3 |
34
- | 2.3 | 4 |
35
- | 2.3 | 5 |
36
- | 2.4 | 3 |
37
- | 2.4 | 5 |
38
- | 2.5 | 3 |
39
- | 2.5 | 5 |
40
- | 2.5 | 6 |
41
-
42
- Scenario Outline: Rails before_notify controller method works on unhandled errors
43
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
44
- And I start the service "rails<rails_version>"
45
- And I wait for the app to respond on port "6128<rails_version>"
46
- When I navigate to the route "/before_notify/unhandled" on port "6128<rails_version>"
47
- Then I should receive a request
48
- And the request is a valid for the error reporting API
49
- And the request used the "Ruby Bugsnag Notifier" notifier
50
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
51
- And the payload field "events" is an array with 1 element
17
+ @rails3 @rails4 @rails5 @rails6
18
+ Scenario: Rails before_notify controller method works on unhandled errors
19
+ Given I start the rails service
20
+ When I navigate to the route "/before_notify/unhandled" on the rails app
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"
52
23
  And the exception "errorClass" equals "NameError"
53
24
  And the exception "message" starts with "undefined local variable or method `generate_unhandled_error' for #<BeforeNotifyController"
54
25
  And the event "unhandled" is true
@@ -57,32 +28,12 @@ Scenario Outline: Rails before_notify controller method works on unhandled error
57
28
  And the event "metaData.before_notify.source" equals "rails_before_unhandled"
58
29
  And the event "metaData.controller.name" equals "BeforeNotifyController"
59
30
 
60
- Examples:
61
- | ruby_version | rails_version |
62
- | 2.0 | 3 |
63
- | 2.1 | 3 |
64
- | 2.2 | 3 |
65
- | 2.2 | 4 |
66
- | 2.2 | 5 |
67
- | 2.3 | 3 |
68
- | 2.3 | 4 |
69
- | 2.3 | 5 |
70
- | 2.4 | 3 |
71
- | 2.4 | 5 |
72
- | 2.5 | 3 |
73
- | 2.5 | 5 |
74
- | 2.5 | 6 |
75
-
76
- Scenario Outline: Inline block on handled errors is called
77
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
78
- And I start the service "rails<rails_version>"
79
- And I wait for the app to respond on port "6128<rails_version>"
80
- When I navigate to the route "/before_notify/inline" on port "6128<rails_version>"
81
- Then I should receive a request
82
- And the request is a valid for the error reporting API
83
- And the request used the "Ruby Bugsnag Notifier" notifier
84
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
85
- And the payload field "events" is an array with 1 element
31
+ @rails3 @rails4 @rails5 @rails6
32
+ Scenario: Inline block on handled errors is called
33
+ Given I start the rails service
34
+ When I navigate to the route "/before_notify/inline" on the rails app
35
+ And I wait to receive a request
36
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
86
37
  And the exception "errorClass" equals "RuntimeError"
87
38
  And the exception "message" starts with "handled string"
88
39
  And the event "unhandled" is false
@@ -91,19 +42,3 @@ Scenario Outline: Inline block on handled errors is called
91
42
  And the event "metaData.before_notify.source" equals "rails_inline"
92
43
  And the event "metaData.controller.name" equals "BeforeNotifyController"
93
44
 
94
- Examples:
95
- | ruby_version | rails_version |
96
- | 2.0 | 3 |
97
- | 2.1 | 3 |
98
- | 2.2 | 3 |
99
- | 2.2 | 4 |
100
- | 2.2 | 5 |
101
- | 2.3 | 3 |
102
- | 2.3 | 4 |
103
- | 2.3 | 5 |
104
- | 2.4 | 3 |
105
- | 2.4 | 5 |
106
- | 2.5 | 3 |
107
- | 2.5 | 5 |
108
- | 2.5 | 6 |
109
-
@@ -1,140 +1,43 @@
1
1
  Feature: Rails automatic breadcrumbs
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I set environment variable "APP_PATH" to "/usr/src"
6
- And I configure the bugsnag endpoint
7
-
8
- Scenario Outline: Request breadcrumb
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I start the service "rails<rails_version>"
11
- And I wait for the app to respond on port "6128<rails_version>"
12
- When I navigate to the route "/breadcrumbs/handled" on port "6128<rails_version>"
13
- Then I should receive a request
14
- And the request is a valid for the error reporting API
15
- And the request used the "Ruby Bugsnag Notifier" notifier
16
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
17
- And the event has a "request" breadcrumb named "Controller started processing"
18
- And the event "breadcrumbs.0.timestamp" is a timestamp
19
- And the event "breadcrumbs.0.metaData.controller" equals "BreadcrumbsController"
20
- And the event "breadcrumbs.0.metaData.action" equals "handled"
21
- And the event "breadcrumbs.0.metaData.method" equals "GET"
22
- And the event "breadcrumbs.0.metaData.path" equals "/breadcrumbs/handled"
23
- And the event "breadcrumbs.0.metaData.event_name" equals "start_processing.action_controller"
24
- And the event "breadcrumbs.0.metaData.event_id" is not null
25
-
26
- Examples:
27
- | ruby_version | rails_version |
28
- | 2.0 | 3 |
29
- | 2.1 | 3 |
30
- | 2.2 | 3 |
31
- | 2.2 | 4 |
32
- | 2.2 | 5 |
33
- | 2.3 | 3 |
34
- | 2.3 | 4 |
35
- | 2.3 | 5 |
36
- | 2.4 | 3 |
37
- | 2.4 | 5 |
38
- | 2.5 | 3 |
39
- | 2.5 | 5 |
40
- | 2.5 | 6 |
41
-
42
- Scenario Outline: SQL Breadcrumb without bindings
43
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
44
- And I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
45
- And I start the service "rails<rails_version>"
46
- And I wait for the app to respond on port "6128<rails_version>"
47
- When I navigate to the route "/breadcrumbs/sql_breadcrumb" on port "6128<rails_version>"
48
- Then I should receive a request
49
- And the request is a valid for the error reporting API
50
- And the request used the "Ruby Bugsnag Notifier" notifier
51
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
52
- And the event has a "process" breadcrumb named "ActiveRecord SQL query"
53
- And the event "breadcrumbs.0.timestamp" is a timestamp
54
- And the event "breadcrumbs.0.metaData.name" equals "User Load"
55
- And the event "breadcrumbs.0.metaData.connection_id" is not null
56
- And the event "breadcrumbs.0.metaData.event_name" equals "sql.active_record"
57
- And the event "breadcrumbs.0.metaData.event_id" is not null
58
-
59
- Examples:
60
- | ruby_version | rails_version |
61
- | 2.0 | 3 |
62
- | 2.1 | 3 |
63
- | 2.2 | 3 |
64
- | 2.2 | 4 |
65
- | 2.3 | 3 |
66
- | 2.3 | 4 |
67
- | 2.4 | 3 |
68
- | 2.5 | 3 |
69
- | 2.5 | 6 |
70
-
71
- Scenario Outline: SQL Breadcrumb with bindings
72
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
73
- And I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
74
- And I start the service "rails<rails_version>"
75
- And I wait for the app to respond on port "6128<rails_version>"
76
- When I navigate to the route "/breadcrumbs/sql_breadcrumb" on port "6128<rails_version>"
77
- Then I should receive a request
78
- And the request is a valid for the error reporting API
79
- And the request used the "Ruby Bugsnag Notifier" notifier
80
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
81
- And the event has a "process" breadcrumb named "ActiveRecord SQL query"
82
- And the event "breadcrumbs.0.timestamp" is a timestamp
83
- And the event "breadcrumbs.0.metaData.name" equals "User Load"
84
- And the event "breadcrumbs.0.metaData.connection_id" is not null
85
- And the event "breadcrumbs.0.metaData.event_name" equals "sql.active_record"
86
- And the event "breadcrumbs.0.metaData.event_id" is not null
87
- And the event "breadcrumbs.0.metaData.binds" equals "{"email":"?","LIMIT":"?"}"
88
-
89
- Examples:
90
- | ruby_version | rails_version |
91
- | 2.2 | 5 |
92
- | 2.3 | 5 |
93
- | 2.4 | 5 |
94
- | 2.5 | 5 |
95
- | 2.5 | 6 |
96
-
97
- Scenario Outline: Active job breadcrumb
98
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
99
- And I start the service "rails<rails_version>"
100
- And I wait for the app to respond on port "6128<rails_version>"
101
- When I navigate to the route "/breadcrumbs/active_job" on port "6128<rails_version>"
102
- Then I should receive a request
103
- And the request is a valid for the error reporting API
104
- And the request used the "Ruby Bugsnag Notifier" notifier
105
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
106
- And the event has a "process" breadcrumb named "Start perform ActiveJob"
107
- And the event "breadcrumbs.0.timestamp" is a timestamp
108
- And the event "breadcrumbs.0.metaData.event_name" equals "perform_start.active_job"
109
- And the event "breadcrumbs.0.metaData.event_id" is not null
110
-
111
- Examples:
112
- | ruby_version | rails_version |
113
- | 2.2 | 4 |
114
- | 2.2 | 5 |
115
- | 2.3 | 4 |
116
- | 2.3 | 5 |
117
- | 2.4 | 5 |
118
- | 2.5 | 5 |
119
- | 2.5 | 6 |
120
-
121
- Scenario Outline: Cache read
122
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
123
- And I start the service "rails<rails_version>"
124
- And I wait for the app to respond on port "6128<rails_version>"
125
- When I navigate to the route "/breadcrumbs/cache_read" on port "6128<rails_version>"
126
- Then I should receive a request
127
- And the request is a valid for the error reporting API
128
- And the request used the "Ruby Bugsnag Notifier" notifier
129
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Request breadcrumb
5
+ Given I start the rails service
6
+ When I navigate to the route "/breadcrumbs/handled" on the rails app
7
+ And I wait to receive a request
8
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
9
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/request.json"
10
+
11
+ @rails3 @rails4
12
+ Scenario: SQL Breadcrumb without bindings
13
+ Given I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
14
+ And I start the rails service
15
+ When I navigate to the route "/breadcrumbs/sql_breadcrumb" on the rails app
16
+ And I wait to receive a request
17
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
18
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/sql_without_bindings.json"
19
+
20
+ @rails5 @rails6
21
+ Scenario: SQL Breadcrumb with bindings
22
+ Given I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
23
+ And I start the rails service
24
+ When I navigate to the route "/breadcrumbs/sql_breadcrumb" on the rails app
25
+ And I wait to receive a request
26
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
27
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/sql_with_bindings.json"
28
+
29
+ @rails4 @rails5 @rails6
30
+ Scenario: Active job breadcrumb
31
+ Given I start the rails service
32
+ When I navigate to the route "/breadcrumbs/active_job" on the rails app
33
+ And I wait to receive a request
34
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
35
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/active_job.json"
36
+
37
+ @rails4 @rails5 @rails6
38
+ Scenario: Cache read
39
+ Given I start the rails service
40
+ When I navigate to the route "/breadcrumbs/cache_read" on the rails app
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"
130
43
  And the event has a "process" breadcrumb named "Read cache"
131
-
132
- Examples:
133
- | ruby_version | rails_version |
134
- | 2.2 | 4 |
135
- | 2.2 | 5 |
136
- | 2.3 | 4 |
137
- | 2.3 | 5 |
138
- | 2.4 | 5 |
139
- | 2.5 | 5 |
140
- | 2.5 | 6 |