feat(metrics): expose the running build as a build_info gauge

Registers gitlab_artifact_registry_build_info{version="<version>"} 1 at boot, the standard build-info gauge, so the deployed version per environment is readable from Prometheus (count by (version) collapses the fleet to the set of builds running). This is the interim we committed to in runway/team#1022 while Runway has no platform-provided deployment-version signal.

Design notes:

  • The version reuses LabKit's app.Version — the same -ldflags -X value already stamped on every log record's version field and handed to server.BuildInfo. No new version plumbing.
  • version is a constant label (one series per process, the standard build_info shape). Constant labels are invisible to AuditCardinality, which walks variable labels only, so the label deliberately has no internal/metrics/cardinality.go entry; TestBuildInfoUnderAudit pins that, and fails pointing at the table if the label is ever converted to a variable one.
  • The catalog row's Owner is N/A: no spec declares this metric, and specs are frozen point-in-time.

No e2e scenario is added or affected: the change is observability-only (a constant gauge on /-/metrics), with no request-path or protocol behavior.

Closes #1080 (closed)

Edited by João Pereira

Merge request reports

Loading
Loading