Skip to content

[Docs]: Add Prometheus / OpenTelemetry observability snippet for doWithMeta and getOrSetWithMeta #10

Backlog

Description

@mayankcodes-dev

Summary

Teams running \ light-shield\ in production want to track cache hit/stale/miss rates, XFetch early refreshes, cache fallback errors, and coalesced caller counts.

Scope

  • Add a clear example (in \examples/\ or a collapsible \README.md\ recipe) mapping \SingleFlight.doWithMeta()\ and \StampedeShield.getOrSetWithMeta()\ fields (\status,
    evalidated, \shared, \coalescedCount, \cacheError) to Prometheus counters or OpenTelemetry metrics.

Activity

  1. added
    documentation
    good first issue
    on Dec 4, 2026
  2. Tejaa11 commented on Dec 4, 2026

    @Tejaa11

    The README recipe in #11 shows how to distinguish an early XFetch refresh from stale revalidation using the exported Prometheus metrics.

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

    documentationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions