fix(controller): move self-metrics port off oteldb's admin API bind - #13
Merged
Conversation
portSelfMetric was 8090, which is oteldb's admin API bind (admin.bind defaults to :8090 and the operator never overrides it), so the Service port named metrics routed to the admin API and UI. Fixes #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12.
portSelfMetricwas8090, which is oteldb's admin API bind:cmd/oteldb/config.godefaultsadmin.bindto:8090and the operator never sets it in the rendered config.What it does today
They don't actually fight over the socket, because the self-metrics endpoint is never created:
podEnvsetsOTEL_EXPORTER_PROMETHEUS_HOST/PORTbut notOTEL_METRICS_EXPORTER, andgo-faster/sdk/autometerdefaults tootlp, sosdk/appnever registers the/metricsHTTPserver and the env var is inert. 8090 is bound by the admin API alone — meaning the container and
Service port named
metricsroutes to the admin API and its embedded web UI. Scraping it yieldsthe SPA, not Prometheus text, with no error logged anywhere. It also publishes an admin API under a
port named
metrics.Enabling the Prometheus exporter would turn the silent version into the loud one: the second binder
gets
address already in usefromListenAndServe, whichsdk/apppropagates through its errgroupand kills the process.
Change
portSelfMetric = 9464— the OpenTelemetry default Prometheus exporter port, and the one oteldb'sown
dev/local/ch-bench-readcompose files already use for this. 8090 is left unexposed anddocumented as the admin bind in the README ports section.
Nothing else referenced 8090: there is no ServiceMonitor for managed clusters
(
config/prometheus/monitor.yamltargets the controller-manager's own:8443), and the port-nameassertion in
signals_test.gogoes throughportNameSelfMetric, not the number.Deliberately not included, to stay clear of
claude/role-node-groups: addingOTEL_METRICS_EXPORTER=prometheusso the port actually serves metrics. That is a behaviour change(self-metrics currently leave over OTLP) and is written up as a follow-up in #12. The diff here is
one constant plus a README line.
Verification
go build ./...andgo test ./...pass.