feat(npm): add virtual resolution metric families, part 1/8 (S31 plan: 18/19)

Summary

Adds the npm virtual resolution metric vocabularies (operation, resolution outcome, position outcome, leg) and registers four collectors in the npm collector set: resolutions, probes, upstream requests, and positions consulted. It also adds the booking and label-enum check helpers for them and extends the cardinality audit in internal/metrics for the new label vocabulary. This is part 1 of an 8-part stack for the npm virtual observability step.

Governing ADRs

None. I checked docs/adr for a decision on observability, metric families, or virtual-repository resolution events; the only mentions are the technology-stack choice of LabKit for metrics and logging (ADR 006), which this change follows without deviating, and no ADR constrains these metric names, labels, or events.

Testing

Ships virtual_metrics_test.go (vocabulary, booking, and enum-check coverage), the registration additions in metrics_test.go, and the cardinality test update. The part builds and passes vet, lint, and tests on its own tree. No e2e row is added or affected: the families and the event are internal observability, not visible from outside the service.

Size

This part is 582 reviewable lines: about 237 lines of production code and 344 lines of tests. Each part is already a function-granularity slice shipped with the tests that cover it, so splitting further would separate a function from its tests without making either easier to review.

Stacked MRs (review/merge bottom-up)

Related to #899 (closed)

Edited by David Fernandez

Merge request reports

Loading
Loading