eventhub-processor2 1.28.0 → 1.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/eventhub/logger.rb +10 -1
- data/lib/eventhub/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30f1770bc8368dade5070d56b70f7d178c4f2b9b411b6c8cedc76d5cee74906a
|
|
4
|
+
data.tar.gz: 437a059f4496b259452423572dc03149dc35dd3992dadf1cf741cf153d76ac44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2c36a143e30f630b64756c0a26e2f3d936ef37a34be14eefac20ed105535ec9a2d7c561ec5e482e16ca0df22e484f09d14d3f5ecf202c2d472fbcc5b4588603
|
|
7
|
+
data.tar.gz: 1e51eb0ae32377c32c2fc5372be3304a276fac5d5df9920658fb804bd8c8461b25a8a9470cccbbc3719963fdfc966e8b9b7f349d7cabb1c9943ddb60ae32cb3e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog of EventHub::Processor2
|
|
2
2
|
|
|
3
|
+
# 1.28.1 / 2026-05-19
|
|
4
|
+
|
|
5
|
+
* Fix `LoggerProxy` double-wrapping when callers pass a Hash to a logger method. Hash inputs are now merged (not nested under `:message`), so the resulting structured event has the caller's fields at the top level - restoring the behaviour that existed before `LoggerProxy` was introduced in 1.26.0, while keeping automatic thread-local injection of `correlation_id` and `execution_id`. Caller-provided values win over thread-locals via `||=`.
|
|
6
|
+
|
|
3
7
|
# 1.28.0 / 2026-05-18
|
|
4
8
|
|
|
5
9
|
**Reliability**
|
data/lib/eventhub/logger.rb
CHANGED
|
@@ -11,7 +11,16 @@ module EventHub
|
|
|
11
11
|
message = block.call if block
|
|
12
12
|
correlation_id = CorrelationId.current
|
|
13
13
|
execution_id = ExecutionId.current
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
if message.is_a?(Hash)
|
|
16
|
+
# Caller already passed a structured event - merge tracing
|
|
17
|
+
# fields in (caller-provided values win via ||=) instead of
|
|
18
|
+
# wrapping under :message, which would double-nest the event.
|
|
19
|
+
log_hash = message.dup
|
|
20
|
+
log_hash[:correlation_id] ||= correlation_id if correlation_id
|
|
21
|
+
log_hash[:execution_id] ||= execution_id if execution_id
|
|
22
|
+
@logger.send(level, log_hash)
|
|
23
|
+
elsif correlation_id || execution_id
|
|
15
24
|
log_hash = {message: message}
|
|
16
25
|
log_hash[:correlation_id] = correlation_id if correlation_id
|
|
17
26
|
log_hash[:execution_id] = execution_id if execution_id
|
data/lib/eventhub/version.rb
CHANGED