Skip to content

cache: no metric or structured log event emitted when a probe hold expires naturally vs. is released early by eviction pressure #739

Closed

Description

@alpergundogdu

ProbeHoldOutcome.BudgetExhausted is counted as probe_hold_violations, but there is no observable signal distinguishing a hold that ran to its full PROBE_HOLD_DURATION from one that was pre-empted by the eviction driver. Operators cannot distinguish misconfigured eviction cadence from genuine cache pressure without this distinction.


Filed via GitDailyReporterBot

Activity

  1. added
    kind:feature
    prio:medium
    on May 31, 2026
  2. github-actions commented on May 31, 2026

    @github-actions

    🎯 Triage report

    This issue requests a new observability signal in the cache crate: distinguishing whether a ProbeHoldOutcome::BudgetExhausted was caused by the hold running to its natural PROBE_HOLD_DURATION timeout vs. being cut short by the eviction driver. Currently both cases increment probe_hold_violations indiscriminately, preventing operators from diagnosing eviction misconfiguration vs. actual cache pressure.

    📊 Assessment

    Dimension Value Reasoning
    Type Enhancement Requests a new metric/structured-log emission; no existing behaviour is broken
    Labels enhancement, technical, medium Observability improvement in the cache crate; moderate operator impact; straightforward scope
    Coding agent Suitable Well-defined: locate the ProbeHoldOutcome::BudgetExhausted arm, split it into two variants or add a sub-reason, emit distinct counters/log events. Success criteria are clear.

    🔗 Similar issues

    💡 Notes and suggestions

    Scope

    • Locate ProbeHoldOutcome enum (likely in crates/cache/) and the site(s) where BudgetExhausted is emitted.
    • Add two sub-paths (or a new enum variant) to separate natural expiry from eviction-preemption:
      • probe_hold_expired_natural_total — hold reached PROBE_HOLD_DURATION without eviction.
      • probe_hold_preempted_by_eviction_total — eviction driver released the hold early.
    • Emit a structured tracing event (tracing::info! / tracing::warn!) with a reason field so operators have both a metrics signal and a log trail.

    Implementation checklist

    • Split BudgetExhausted into two variants or add a reason: HoldReleaseReason field.
    • Update the probe_hold_violations counter site (or replace with the two new counters).
    • Add structured log events at the split point.
    • Update appendix-observability.md (or the relevant ADR section) to document the new counters.
    • Add unit/integration test asserting each counter increments only for its respective path.

    Note: The closed issue #150 already recommended probe_hold_violations_total be added; confirm it landed before duplicating work.

    Generated by Agentic Triage for issue #739 · sonnet46 388.9K · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:featureprio:medium

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions