cache-manager - feat: add store layer identification to event payloads#1270
cache-manager - feat: add store layer identification to event payloads#1270jaredwray merged 3 commits intojaredwray:mainfrom
Conversation
|
@faizanu94 - thanks for submitting this PR. I will look at this later today or tomorrow once npm starts working better as they are having issues right now. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1270 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 35 35
Lines 4186 4190 +4
Branches 1180 1179 -1
=========================================
+ Hits 4186 4190 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@faizanu94 - thanks for doing this. I will keep the issue open as I will want to add it to |
|
This should be live pretty soon. |
|
Thanks @jaredwray 👍 Just saw |
Yep. able to get that added today! |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Implements #1128 by adding store layer identification to event payloads in
cache-manager.Previously, event payloads (
get,set, etc.) did not include which store/layer (primary or secondary) was responsible. This limited monitoring and debugging when multiple stores were configured.Changes
_storeLabelhelper:"primary"for index0"secondary:N"for deeper layersgetandset(including errors) to emit thestorefield in event payloads.getpayload includes store and value, error events include store.setemits store IDs, and deeper layers (e.g.,"secondary:1") are labeled correctly.Motivation
This enables:
Result
Event payloads are now enriched with
storeinformation while maintaining backward compatibility.