Skip to content

No lock snapshot-size metric: operators can't see how close a repository is to MaxSnapshotLocks (spec instrumentation item missing) #72

Description

@matt-edmondson

Plan

docs/superpowers/specs/2026-08-19-locks-subsystem-design.md#L236-L238

New counters on the existing ktsu.GitLfsCache meter: lock list hits, lock list refreshes, refresh failures, admission probes, admission rejections, fan-out items attempted, fan-out items succeeded, fan-out throttle pauses, and snapshot size.

What exists today

GitLfsCache/Observability/CacheMetrics.cs:67-75 defines every counter in that list except snapshot size. There is no snapshot_size instrument anywhere under GitLfsCache/.

What's missing

Nothing records how many locks a published snapshot holds, so operators can't see:

Acceptance criteria

  • A histogram (or an observable gauge per repository), e.g. gitlfscache.lock_snapshot_size, tagged by upstream and recorded each time a snapshot is published.
  • A walk rejected as TooLarge records its count too, or through a companion counter, so the over-limit case is visible.
  • A test asserts that the measurement is recorded on publish.

Dependencies

None.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions