feat(metrics)!: classify cache misses by reason - #146
Open
lan17 wants to merge 1 commit into
Open
Conversation
lan17
force-pushed
the
codex/issue-141-fenced-refills
branch
2 times, most recently
from
August 30, 2026 03:57
86caf56 to
a0150bd
Compare
Add a bounded reason to the existing miss event while preserving the independent observed-watermark refill fence for typed Redis reads. BREAKING CHANGE: DialCacheMetricsAdapter.miss now receives MissMetricLabels and first-party miss metrics add a required reason label/tag.
lan17
force-pushed
the
codex/issue-145-miss-reasons
branch
from
August 30, 2026 04:12
df6b10f to
4cf8d28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #145 and replaces the closed, stale attempt at #130.
Design
Bundled decoders return classified semantic misses. A genuine tracked frame-versus-watermark rejection is watermark_fenced; Redis nil is value_absent; malformed metadata, client-side future/invalid timestamps, serializer-load failure, and legacy custom null reads are unclassified. Core validates custom typed results so watermark_fenced requires a valid tracked observed watermark.
Prometheus keeps dialcache_miss_counter and adds its fifth reason label. Datadog keeps dialcache.miss.count and adds the same reason tag. Migration notes cover same-registry incompatibility, mixed-fleet PromQL aggregation, Datadog cardinality, and custom metric adapters.
Dependency
This is deliberately stacked on #143, which introduces the observed-refill-fence result model this change classifies. After that PR merges, retarget or rebase this PR onto main before merge.
Breaking change
BREAKING CHANGE: DialCacheMetricsAdapter.miss now receives MissMetricLabels, and first-party miss metrics require the reason label or tag. Under the pre-1.0 release policy, this is a minor release.
Validation