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,15 @@
|
|
1
|
+
{
|
2
|
+
"type": "process",
|
3
|
+
"name": "Mongo query failed",
|
4
|
+
"timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$",
|
5
|
+
"metaData": {
|
6
|
+
"command_name": "bogus",
|
7
|
+
"database_name": "^rails\\d_development$",
|
8
|
+
"operation_id": "NUMBER",
|
9
|
+
"event_name": "mongo.failed",
|
10
|
+
"request_id": "NUMBER",
|
11
|
+
"duration": "NUMBER",
|
12
|
+
"collection": 1,
|
13
|
+
"message": "no such command: 'bogus' (59)"
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"type": "process",
|
3
|
+
"name": "Mongo query succeeded",
|
4
|
+
"timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$",
|
5
|
+
"metaData": {
|
6
|
+
"command_name": "find",
|
7
|
+
"database_name": "^rails\\d_development$",
|
8
|
+
"operation_id": "NUMBER",
|
9
|
+
"event_name": "mongo.succeeded",
|
10
|
+
"request_id": "NUMBER",
|
11
|
+
"duration": "NUMBER",
|
12
|
+
"collection": "mongo_models",
|
13
|
+
"filter": "{\"string_field\":\"?\"}"
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"type": "process",
|
3
|
+
"name": "Mongo query succeeded",
|
4
|
+
"timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$",
|
5
|
+
"metaData": {
|
6
|
+
"command_name": "find",
|
7
|
+
"database_name": "^rails\\d_development$",
|
8
|
+
"operation_id": "NUMBER",
|
9
|
+
"event_name": "mongo.succeeded",
|
10
|
+
"request_id": "NUMBER",
|
11
|
+
"duration": "NUMBER",
|
12
|
+
"collection": "mongo_models",
|
13
|
+
"filter": "{\"$or\":[{\"string_field\":\"?\"},{\"numeric_field\":\"?\"}]}"
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"type": "process",
|
3
|
+
"name": "Mongo query succeeded",
|
4
|
+
"timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$",
|
5
|
+
"metaData": {
|
6
|
+
"command_name": "insert",
|
7
|
+
"database_name": "^rails\\d_development$",
|
8
|
+
"operation_id": "NUMBER",
|
9
|
+
"event_name": "mongo.succeeded",
|
10
|
+
"request_id": "NUMBER",
|
11
|
+
"duration": "NUMBER",
|
12
|
+
"collection": "mongo_models"
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"type": "request",
|
3
|
+
"name": "Controller started processing",
|
4
|
+
"timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$",
|
5
|
+
"metaData": {
|
6
|
+
"controller": "BreadcrumbsController",
|
7
|
+
"action": "handled",
|
8
|
+
"method": "GET",
|
9
|
+
"path": "/breadcrumbs/handled",
|
10
|
+
"event_name": "start_processing.action_controller",
|
11
|
+
"event_id": ".*"
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"type": "process",
|
3
|
+
"name": "ActiveRecord SQL query",
|
4
|
+
"timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$",
|
5
|
+
"metaData": {
|
6
|
+
"name": "User Load",
|
7
|
+
"connection_id": "NUMBER",
|
8
|
+
"event_name": "sql.active_record",
|
9
|
+
"event_id": ".*",
|
10
|
+
"binds": "{\"email\":\"?\",\"LIMIT\":\"?\"}"
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"type": "process",
|
3
|
+
"name": "ActiveRecord SQL query",
|
4
|
+
"timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$",
|
5
|
+
"metaData": {
|
6
|
+
"name": "User Load",
|
7
|
+
"connection_id": "NUMBER",
|
8
|
+
"event_name": "sql.active_record",
|
9
|
+
"event_id": ".*"
|
10
|
+
}
|
11
|
+
}
|
@@ -4,13 +4,11 @@ require 'pp'
|
|
4
4
|
def configure_basics
|
5
5
|
Bugsnag.configure do |conf|
|
6
6
|
conf.api_key = ENV['BUGSNAG_API_KEY']
|
7
|
-
conf.
|
8
|
-
conf.session_endpoint = ENV["BUGSNAG_SESSION_ENDPOINT"] if ENV.include? "BUGSNAG_SESSION_ENDPOINT"
|
7
|
+
conf.set_endpoints(ENV['BUGSNAG_ENDPOINT'], ENV["BUGSNAG_ENDPOINT"])
|
9
8
|
end
|
10
9
|
end
|
11
10
|
|
12
11
|
def configure_using_environment
|
13
|
-
pp ENV
|
14
12
|
Bugsnag.configure do |conf|
|
15
13
|
conf.app_type = ENV["BUGSNAG_APP_TYPE"] if ENV.include? "BUGSNAG_APP_TYPE"
|
16
14
|
conf.app_version = ENV["BUGSNAG_APP_VERSION"] if ENV.include? "BUGSNAG_APP_VERSION"
|
@@ -13,6 +13,8 @@ Bugsnag.notify("handled string") do |report|
|
|
13
13
|
})
|
14
14
|
end
|
15
15
|
|
16
|
+
# Added to stop Process deadlock
|
17
|
+
sleep(0.01)
|
16
18
|
Process.fork do
|
17
19
|
Bugsnag.notify("handled string number 2") do |report|
|
18
20
|
report.add_tab(:config, {
|
@@ -22,4 +24,4 @@ Process.fork do
|
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
25
|
-
Process.wait
|
27
|
+
Process.wait
|
File without changes
|
@@ -7,14 +7,15 @@ Bugsnag.configure do |config|
|
|
7
7
|
config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false"
|
8
8
|
config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT"
|
9
9
|
config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS"
|
10
|
-
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"]
|
10
|
+
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"] == "true"
|
11
11
|
config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE"
|
12
12
|
config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false"
|
13
13
|
config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true"
|
14
|
+
config.meta_data_filters << 'filtered_parameter'
|
14
15
|
|
15
16
|
if ENV["SQL_ONLY_BREADCRUMBS"] == "true"
|
16
17
|
config.before_breadcrumb_callbacks << Proc.new do |breadcrumb|
|
17
18
|
breadcrumb.ignore! unless breadcrumb.meta_data[:event_name] == "sql.active_record" && breadcrumb.meta_data[:name] == "User Load"
|
18
19
|
end
|
19
20
|
end
|
20
|
-
end
|
21
|
+
end
|
@@ -7,10 +7,11 @@ Bugsnag.configure do |config|
|
|
7
7
|
config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false"
|
8
8
|
config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT"
|
9
9
|
config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS"
|
10
|
-
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"]
|
10
|
+
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"] == "true"
|
11
11
|
config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE"
|
12
12
|
config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false"
|
13
13
|
config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true"
|
14
|
+
config.meta_data_filters << 'filtered_parameter'
|
14
15
|
|
15
16
|
if ENV["SQL_ONLY_BREADCRUMBS"] == "true"
|
16
17
|
config.before_breadcrumb_callbacks << Proc.new do |breadcrumb|
|
@@ -43,8 +43,9 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
|
43
43
|
# Added at 2018-03-26 15:20:23 +0100 by amoinet:
|
44
44
|
gem 'bugsnag', path: '/bugsnag'
|
45
45
|
|
46
|
-
#
|
47
|
-
|
46
|
+
# Clearance breaks in Ruby < 2.3 and needs to be pinned to `1.16.1`
|
47
|
+
ruby_version = Gem::Version.new(RUBY_VERSION)
|
48
|
+
gem "clearance", ruby_version < Gem::Version.new('2.3.0') ? '1.16.1' : '~> 1.16'
|
48
49
|
|
49
50
|
gem "mongoid"
|
50
51
|
|
@@ -7,10 +7,11 @@ Bugsnag.configure do |config|
|
|
7
7
|
config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false"
|
8
8
|
config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT"
|
9
9
|
config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS"
|
10
|
-
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"]
|
10
|
+
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"] == "true"
|
11
11
|
config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE"
|
12
12
|
config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false"
|
13
13
|
config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true"
|
14
|
+
config.meta_data_filters << 'filtered_parameter'
|
14
15
|
|
15
16
|
if ENV["SQL_ONLY_BREADCRUMBS"] == "true"
|
16
17
|
config.before_breadcrumb_callbacks << Proc.new do |breadcrumb|
|
@@ -51,7 +51,8 @@ end
|
|
51
51
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
52
52
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
53
53
|
|
54
|
-
|
55
|
-
|
54
|
+
gem 'bugsnag', path: '/bugsnag'
|
55
|
+
|
56
|
+
gem "mongoid"
|
56
57
|
|
57
58
|
gem "clearance", "~> 1.16"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class MongoController < ApplicationController
|
2
|
+
def success_crash
|
3
|
+
doc = MongoModel.create(string_field: "String")
|
4
|
+
doc.save
|
5
|
+
"Statement".prepnd("Failing")
|
6
|
+
end
|
7
|
+
|
8
|
+
def get_crash
|
9
|
+
MongoModel.where(string_field: true).as_json
|
10
|
+
MongoModel.any_of({string_field: true}, {numeric_field: 123}).as_json
|
11
|
+
"Statement".prepnd("Failing")
|
12
|
+
end
|
13
|
+
|
14
|
+
def failure_crash
|
15
|
+
begin
|
16
|
+
Mongoid::Clients.default.database.command(:bogus => 1)
|
17
|
+
rescue
|
18
|
+
end
|
19
|
+
|
20
|
+
"Statement".prepnd("Failing")
|
21
|
+
end
|
22
|
+
end
|
@@ -59,4 +59,6 @@ Rails.application.configure do
|
|
59
59
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
60
60
|
# routes, locales, etc. This feature depends on the listen gem.
|
61
61
|
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
62
|
+
|
63
|
+
config.hosts << "rails6"
|
62
64
|
end
|
@@ -109,4 +109,5 @@ Rails.application.configure do
|
|
109
109
|
# config.active_record.database_selector = { delay: 2.seconds }
|
110
110
|
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
111
111
|
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
112
|
+
config.hosts << "rails6"
|
112
113
|
end
|
@@ -52,4 +52,5 @@ Rails.application.configure do
|
|
52
52
|
# routes, locales, etc. This feature depends on the listen gem.
|
53
53
|
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
54
54
|
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
55
|
+
config.hosts << "rails6"
|
55
56
|
end
|
@@ -7,10 +7,11 @@ Bugsnag.configure do |config|
|
|
7
7
|
config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false"
|
8
8
|
config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT"
|
9
9
|
config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS"
|
10
|
-
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"]
|
10
|
+
config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" unless ENV["USE_DEFAULT_AUTO_CAPTURE_SESSIONS"] == "true"
|
11
11
|
config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE"
|
12
12
|
config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false"
|
13
13
|
config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true"
|
14
|
+
config.meta_data_filters << 'filtered_parameter'
|
14
15
|
|
15
16
|
if ENV["SQL_ONLY_BREADCRUMBS"] == "true"
|
16
17
|
config.before_breadcrumb_callbacks << Proc.new do |breadcrumb|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
development:
|
2
|
+
# Configure available database clients. (required)
|
3
|
+
clients:
|
4
|
+
# Defines the default client. (required)
|
5
|
+
default:
|
6
|
+
# Defines the name of the default database that Mongoid can connect to.
|
7
|
+
# (required).
|
8
|
+
database: rails6_development
|
9
|
+
# Provides the hosts the default client can connect to. Must be an array
|
10
|
+
# of host:port pairs. (required)
|
11
|
+
hosts:
|
12
|
+
- mongo:27017
|
13
|
+
|
14
|
+
test:
|
15
|
+
clients:
|
16
|
+
default:
|
17
|
+
database: rails6_test
|
18
|
+
hosts:
|
19
|
+
- mongo:27017
|
20
|
+
options:
|
21
|
+
read:
|
22
|
+
mode: :primary
|
23
|
+
max_pool_size: 1
|
@@ -55,4 +55,8 @@ Rails.application.routes.draw do
|
|
55
55
|
get 'breadcrumbs/sql_breadcrumb', to: 'breadcrumbs#sql_breadcrumb'
|
56
56
|
get 'breadcrumbs/active_job', to: 'breadcrumbs#active_job'
|
57
57
|
get 'breadcrumbs/cache_read', to: 'breadcrumbs#cache_read'
|
58
|
+
|
59
|
+
get 'mongo/success_crash', to: 'mongo#success_crash'
|
60
|
+
get 'mongo/get_crash', to: 'mongo#get_crash'
|
61
|
+
get 'mongo/failure_crash', to: 'mongo#failure_crash'
|
58
62
|
end
|
@@ -1,19 +1,17 @@
|
|
1
|
-
ARG
|
2
|
-
FROM ruby:$
|
1
|
+
ARG RUBY_TEST_VERSION
|
2
|
+
FROM ruby:$RUBY_TEST_VERSION
|
3
3
|
|
4
4
|
WORKDIR /bugsnag
|
5
5
|
COPY temp-bugsnag-lib ./
|
6
6
|
|
7
7
|
ARG APP_PATH
|
8
8
|
|
9
|
-
WORKDIR
|
9
|
+
WORKDIR /app/
|
10
10
|
|
11
|
+
COPY app/Gemfile Gemfile
|
11
12
|
ARG SIDEKIQ_VERSION
|
12
13
|
ENV SIDEKIQ_VERSION $SIDEKIQ_VERSION
|
13
14
|
|
14
|
-
COPY app/Gemfile $APP_PATH
|
15
15
|
RUN bundle install
|
16
16
|
|
17
|
-
COPY app/
|
18
|
-
|
19
|
-
CMD ["bundle", "exec", "sidekiq", "-r", "./app.rb"]
|
17
|
+
COPY app/ /app/
|