Skip to content

feat(ts): add observability metrics#136

Closed
lan17 wants to merge 1 commit into
lev/ts-m3-config-rampfrom
lev/ts-m4-observability
Closed

feat(ts): add observability metrics#136
lan17 wants to merge 1 commit into
lev/ts-m3-config-rampfrom
lev/ts-m4-observability

Conversation

@lan17
Copy link
Copy Markdown
Collaborator

@lan17 lan17 commented May 12, 2026

Summary

  • add observability hooks for requests, misses, disabled cache paths, cache/fallback errors, invalidation calls, get/fallback/serialization timers, and serialized value sizes
  • add Prometheus support via prom-client with custom registry/prefix support and duplicate collector reuse
  • support custom metrics adapters for non-Prometheus integrations
  • improve cache-vs-fallback error classification and disabled-reason labels
  • document Milestone 4 metrics behavior and add Given/When/Then behavioral coverage

Validation

  • pnpm install --frozen-lockfile
  • pnpm ts:gcache:typecheck
  • pnpm ts:gcache:test — 42 tests, coverage: 97.3% statements / 93.4% branches / 97.8% functions / 97.55% lines
  • pnpm ts:gcache:build

Stack

Stacked on #135 / lev/ts-m3-config-ramp. This PR intentionally leaves targeted invalidation/watermarks and framework integrations for later milestone PRs.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.47%. Comparing base (41a08a5) to head (d126ede).

Additional details and impacted files
@@                  Coverage Diff                   @@
##           lev/ts-m3-config-ramp     #136   +/-   ##
======================================================
  Coverage                  97.47%   97.47%           
======================================================
  Files                         13       13           
  Lines                        673      673           
======================================================
  Hits                         656      656           
  Misses                        17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lan17
Copy link
Copy Markdown
Collaborator Author

lan17 commented May 12, 2026

Closing this stacked milestone PR in favor of the consolidated peak PR #137.

@lan17 lan17 closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants