Task · GCI-0008.04

Signal label inventory source - Mimir, Loki, Tempo, Pyroscope label reads

Description

The WHICH half. New collector source reading label names and values from all four signal databases with the org CAP, using the HTTP basic pattern already in collector/sources/dataplane.py - username from AUTH_FIELD, password the CAP.

Verified endpoints, 2026-08-24

Signal Path Note
Mimir {hmInstancePromUrl}/api/prom/api/v1/label//values hmInstancePromUrl carries NO /api/prom suffix; omitting it 404s
Loki {hlInstanceUrl}/loki/api/v1/labels and /label//values ns-precision start/end
Tempo {htInstanceUrl}/tempo/api/v2/search/tags and /tag//values tag names fully qualified, e.g. resource.service.name; values are objects not strings
Pyroscope POST {hpInstanceUrl}/querier.v1.QuerierService/LabelValues epoch MILLISECONDS, 400 without a range

Pyroscope is Connect-RPC; reuse dataplane._connect_rpc, which already refuses any path that is not a List or Querier method. Do not relax ReadOnlyClient.

Measured shape, six sampled stacks, 24h window

Stack metric names loki services tempo services pyro services wall
A 883 2 1 0 1.5s
B 1,907 85 8 0 2.6s
C 620 309 1 0 3.7s
D 1,989 10 15 0 1.0s
E 1,069 183 1 0 1.2s
F 335 2,721 1 0 1.2s

Consequences to design for:

Wiring

Acceptance Criteria

Definition of Done

Implementation Notes

Implemented the daily atomic four-signal inventory on 2026-08-24. Mimir, Loki and Tempo use the shared GET-only client; Pyroscope uses the existing guarded Connect-RPC helper with a bounded read payload. Every request carries the same explicit 24-hour window in the signal’s required epoch unit. A failed signal withholds the stack record behind a closed failure reason; successful empty lists remain measured absence. Registered signal_inventory as a T2-owned hydrated input and updated the derived provenance-series budget.

Verification: CodeRabbit reviewed the staged code with zero findings. Full suite: 1367 passed, 2 skipped, 6580 subtests. Fresh-cache OpenTofu init and validate passed for the module and standalone example; recursive formatting and shipped-text gates passed. The private customer-identifier gate remains pending on GitHub Actions run 32770213014 because no runner has accepted the queued workflow; the local command correctly refuses to run without the private pattern source.

Final Summary

Shipped the atomic explicitly-windowed label inventory across Mimir, Loki, Tempo and Pyroscope, preserving empty measurements and withholding failed stack rows. Hydration registration, derived dependencies, full tests, Terraform validation and the secret-backed identifier scan passed.

View the source file on GitHub