exception_handling 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/exception_handling/version.rb +1 -1
- data/lib/exception_handling.rb +1 -1
- data/spec/unit/exception_handling_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8107c2d7f6cf04a39a6f642eb27b327d605eb2fdd2e04762d248ab577b45e02
|
4
|
+
data.tar.gz: e9cfa08279d74c8a40b05ca29bd3129d621d89447c1d981e6443d23454e51822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2773644ac06df5431f1a7b0c523beebae6168361a807453a1727d3b2d53dacb29fc8a07f9e362dcc4bc5140dae8cbc513bec5a1d3aea3584b4c91c08301f0ce2
|
7
|
+
data.tar.gz: 05eeae5bd5a88bd9388802b9351d5a3d1810ed1ce97bf2399513947e2c9ae3ca7536ffdd68ea0febc48ecdfa369ddfa44b6c98237aed46fff58bded2f33b8817
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
5
5
|
**Note:** this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [3.1.1] - 2024-03-19
|
8
|
+
### Changed
|
9
|
+
- Changed how the `honeybadger_tag_from_log_context` to now combine the tag name with the value using a colon `:` instead of two hyphens `--`.
|
10
|
+
- There was a bug in Honeybadger that was preventing colons from being used in tags. However that bug is now fixed so we can use colons (which look better).
|
11
|
+
|
7
12
|
## [3.1.0] - 2024-03-12
|
8
13
|
### Added
|
9
14
|
- Add interface for tagging exceptions sent to honeybadger with values from the log context.
|
data/Gemfile.lock
CHANGED
data/lib/exception_handling.rb
CHANGED
@@ -379,7 +379,7 @@ module ExceptionHandling # never included
|
|
379
379
|
if @honeybadger_log_context_tags
|
380
380
|
@honeybadger_log_context_tags.map do |tag_name, tag_path|
|
381
381
|
if (value_from_log_context = honeybadger_context_data.dig(:log_context, *tag_path))
|
382
|
-
"#{tag_name}
|
382
|
+
"#{tag_name}:#{value_from_log_context}"
|
383
383
|
end
|
384
384
|
end.compact
|
385
385
|
else
|
@@ -1091,7 +1091,7 @@ describe ExceptionHandling do
|
|
1091
1091
|
context "when error is logged within a log context that matches the path" do
|
1092
1092
|
it "notifies honeybadger with the tags from the log context" do
|
1093
1093
|
ExceptionHandling.logger.with_context("kubernetes" => { "context" => "local" }) do
|
1094
|
-
expect(Honeybadger).to receive(:notify).with(hash_including({ tags: "kubernetes_context
|
1094
|
+
expect(Honeybadger).to receive(:notify).with(hash_including({ tags: "kubernetes_context:local" }))
|
1095
1095
|
ExceptionHandling.log_error(StandardError.new("Error"), nil)
|
1096
1096
|
end
|
1097
1097
|
end
|
@@ -1123,7 +1123,7 @@ describe ExceptionHandling do
|
|
1123
1123
|
end
|
1124
1124
|
|
1125
1125
|
it "combines all the tags from different sources" do
|
1126
|
-
expect(Honeybadger).to receive(:notify).with(hash_including({ tags: "auto-tag inline-tag log-context
|
1126
|
+
expect(Honeybadger).to receive(:notify).with(hash_including({ tags: "auto-tag inline-tag log-context:tag" }))
|
1127
1127
|
ExceptionHandling.logger.with_context("inside" => { "context" => "tag" }) do
|
1128
1128
|
log_error
|
1129
1129
|
end
|
@@ -1133,7 +1133,7 @@ describe ExceptionHandling do
|
|
1133
1133
|
let(:inline_tags) { ["auto-tag"] }
|
1134
1134
|
|
1135
1135
|
it "notifies honeybadger with the set of tags" do
|
1136
|
-
expect(Honeybadger).to receive(:notify).with(hash_including({ tags: "auto-tag log-context
|
1136
|
+
expect(Honeybadger).to receive(:notify).with(hash_including({ tags: "auto-tag log-context:tag" }))
|
1137
1137
|
ExceptionHandling.logger.with_context("inside" => { "context" => "tag" }) do
|
1138
1138
|
log_error
|
1139
1139
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_handling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|