bugsnag 6.19.0 → 6.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a3825d21f3c5d15bfb0244584a4cf18032fae0c7432a829db961b8310f3c679
4
- data.tar.gz: 0b6008183c0562e67c8a5ef1ae6c599645aad55313fbcc3aa6d7a7b2996ca98d
3
+ metadata.gz: cfe6701fa69f8d7c3c78476d17d127f921a6f730cdd3b618f92e6f7c2483da74
4
+ data.tar.gz: '0857ab0742b7a33acfa39a60f4ecf9114f20b30293c78ef7bb1d1ba52ddef664'
5
5
  SHA512:
6
- metadata.gz: ffc195c3a00ecbf51f76974ac5281536ff406fa944030b6c36f907cdabceaa79a15720094c4f7f53347cbc760819cb0600cbd5ed9117d8e3d1d34e3f614e9eb3
7
- data.tar.gz: ca216fbbf877e60007be16315bad08ce1d5b07a884e4dc83ef2c7e548cd4511b31e92f608cfe5ee7463adf0bad6e33710009a4679bab45089481ffa918fd44ec
6
+ metadata.gz: 3a917b2fc75798b3bd5e95416ab8c26f013133c84739f9d58df7bbd687de5b736184d11eae1e604944ba85267f214999f4a552e7beef1b271401e8598841a966
7
+ data.tar.gz: abb394a0305a254ce1fda64eba446e49949142f42480e6adf176bf1e62e5cfe6a0280421afbfbefda48bfa3dab31f815891705de4eb1d0d59df2b520575aea93
data/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v6.20.0 (29 March 2021)
5
+
6
+ ### Enhancements
7
+
8
+ * Classify `ActionDispatch::Http::MimeNegotiation::InvalidType` as info severity level
9
+ | [#654](https://github.com/bugsnag/bugsnag-ruby/pull/654)
10
+
11
+ ### Fixes
12
+
13
+ * Include `connection_id` in ActiveRecord breadcrumb metadata on new versons of Rails
14
+ | [#655](https://github.com/bugsnag/bugsnag-ruby/pull/655)
15
+ * Avoid crash when Mongo 1.12 or earlier is used
16
+ | [#652](https://github.com/bugsnag/bugsnag-ruby/pull/652)
17
+ | [isabanin](https://github.com/isabanin)
18
+
4
19
  ## 6.19.0 (6 January 2021)
5
20
 
6
21
  ### Enhancements
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.19.0
1
+ 6.20.0
@@ -127,6 +127,8 @@ module Bugsnag
127
127
  end
128
128
  end
129
129
 
130
- ##
131
- # Add the subscriber to the global Mongo monitoring object
132
- Mongo::Monitoring::Global.subscribe(Mongo::Monitoring::COMMAND, Bugsnag::MongoBreadcrumbSubscriber.new)
130
+ if defined?(Mongo::Monitoring)
131
+ ##
132
+ # Add the subscriber to the global Mongo monitoring object
133
+ Mongo::Monitoring::Global.subscribe(Mongo::Monitoring::COMMAND, Bugsnag::MongoBreadcrumbSubscriber.new)
134
+ end
@@ -38,6 +38,8 @@ module Bugsnag::Rails
38
38
  :type => Bugsnag::Breadcrumbs::PROCESS_BREADCRUMB_TYPE,
39
39
  :allowed_data => [
40
40
  :name,
41
+ # :connection_id is no longer provided in Rails 6.1+ but we can get it
42
+ # from the :connection key of the event instead
41
43
  :connection_id,
42
44
  :cached
43
45
  ]
@@ -91,10 +91,21 @@ module Bugsnag
91
91
  filtered_data = data.slice(*event[:allowed_data])
92
92
  filtered_data[:event_name] = event[:id]
93
93
  filtered_data[:event_id] = event_id
94
- if event[:id] == "sql.active_record" && data.key?(:binds)
95
- binds = data[:binds].each_with_object({}) { |bind, output| output[bind.name] = '?' if defined?(bind.name) }
96
- filtered_data[:binds] = JSON.dump(binds) unless binds.empty?
94
+
95
+ if event[:id] == "sql.active_record"
96
+ if data.key?(:binds)
97
+ binds = data[:binds].each_with_object({}) { |bind, output| output[bind.name] = '?' if defined?(bind.name) }
98
+ filtered_data[:binds] = JSON.dump(binds) unless binds.empty?
99
+ end
100
+
101
+ # Rails < 6.1 included connection_id in the event data, but now
102
+ # includes the connection object instead
103
+ if data.key?(:connection) && !data.key?(:connection_id)
104
+ # the connection ID is the object_id of the connection object
105
+ filtered_data[:connection_id] = data[:connection].object_id
106
+ end
97
107
  end
108
+
98
109
  Bugsnag.leave_breadcrumb(
99
110
  event[:message],
100
111
  filtered_data,
@@ -9,6 +9,7 @@ module Bugsnag::Middleware
9
9
  "ActionController::UnknownAction",
10
10
  "ActionController::UnknownFormat",
11
11
  "ActionController::UnknownHttpMethod",
12
+ "ActionDispatch::Http::MimeNegotiation::InvalidType",
12
13
  "ActiveRecord::RecordNotFound",
13
14
  "CGI::Session::CookieStore::TamperedWithCookie",
14
15
  "Mongoid::Errors::DocumentNotFound",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.19.0
4
+ version: 6.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-06 00:00:00.000000000 Z
11
+ date: 2021-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.2.0
112
+ rubygems_version: 3.2.11
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Ruby notifier for bugsnag.com