diff --git a/CHANGELOG.md b/CHANGELOG.md index 103f6fa7..c43792b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## UNRELEASED +# 1.23.2 - 2024-01-22 +- Fix: Send a `publish_error` metric for errors other than `DeliveryFailed`. + # 1.23.0 - 2024-01-09 - Fix: Fixed handler metric for status:received, status:success in batch consumption diff --git a/lib/deimos/instrumentation.rb b/lib/deimos/instrumentation.rb index e0074962..7dfe2d33 100644 --- a/lib/deimos/instrumentation.rb +++ b/lib/deimos/instrumentation.rb @@ -77,7 +77,7 @@ def self.send_produce_error(event) else Deimos.config.metrics&.increment( 'publish_error', - by: event.respond_to?(:[]) ? event[:message_count] : 1 + by: event.payload[:message_count] || 1 ) end end diff --git a/lib/deimos/version.rb b/lib/deimos/version.rb index a1111f26..0666d475 100644 --- a/lib/deimos/version.rb +++ b/lib/deimos/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Deimos - VERSION = '1.23.0' + VERSION = '1.23.2' end