Skip to content

Report the build and pod name each proxy process is running - #273

Draft
liam-lowe wants to merge 1 commit into
mainfrom
liam-lowe/proxy-build-info
Draft

Report the build and pod name each proxy process is running#273
liam-lowe wants to merge 1 commit into
mainfrom
liam-lowe/proxy-build-info

Conversation

@liam-lowe

Copy link
Copy Markdown
Contributor

Adds a build_info gauge, always 1, labelled with the version the running binary was stamped with.

collectors.NewBuildInfoCollector reports the Go module version. That is not the same thing. This reports the -X main.Version stamp. A half-finished rollout is therefore visible as two series rather than one.

Reporting it needs the process to know who it is. This therefore also adds Identity: a Version and a MemberID, supplied to NewProxy rather than read from config. A value in the shared config file would be identical on every replica. That is the one thing an identity cannot be.

DefaultIdentity reads $POD_NAME first. A Kubernetes deployment can therefore be explicit. The fallback is the hostname. Inside a pod that is the pod name. The chart supplies POD_NAME through the downward API.

NewProxy gains a third parameter. Every caller is updated. app/app.go supplies DefaultIdentity. The test callers supply a literal.

Testing

  • make lint: 0 issues.
  • go test -race ./...: every package passes.
  • helm unittest s2s-proxy/: passes. make helm-example shows no drift.
  • No new test. build_info is set on a path the existing NewProxy tests already exercise. DefaultIdentity reads only the environment. Both are worth covering when a consumer of MemberID arrives.

@liam-lowe
liam-lowe requested a review from a team as a code owner September 2, 2026 22:41
@liam-lowe
liam-lowe marked this pull request as draft September 2, 2026 22:43
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.

1 participant