Repository navigation
chore!: remove legacy AI Gateway metric aliases - #32381
Merged
Merged
Conversation
mollymaefraser
marked this pull request as ready for review
November 18, 2026 09:28
pawbana
approved these changes
Nov 19, 2026
pawbana
left a comment
Collaborator
There was a problem hiding this comment.
Generally LGTM. Few nits that can be easily solved, I don't want to block on re-review.
pawbana
approved these changes
Nov 19, 2026
ssncferreira
approved these changes
Nov 19, 2026
ssncferreira
left a comment
Collaborator
There was a problem hiding this comment.
LGTM 👍 just a small nit
ssncferreira
approved these changes
Nov 19, 2026
ssncferreira
left a comment
Collaborator
There was a problem hiding this comment.
LGTM 🌟 thanks for addressing the comment!
mollymaefraser
had a problem deploying
to
docs-preview
November 19, 2026 13:24 — with
GitHub Actions
Failure
This branch had an error being deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Removes the deprecated
coder_aibridged_*andcoder_aibridgeproxyd_*Prometheus metric aliases, which were scheduled for removal in v2.37. The embedded AI Gateway and AI Gateway Proxy now emit onlycoder_ai_gateway_*andcoder_ai_gateway_proxy_*.NewMetricAliasRegistererwithprometheus.WrapRegistererWithPrefixincli/server.goandenterprise/cli/aibridgeproxyd.go.coderd/prometheusmetrics/metricalias.goand its test (no remaining callers).Breaking: dashboards and alerts that still use the legacy names stop matching. The monitoring docs show a temporary
metric_relabel_configsbridge.Closes AIGOV-447.
Implementation plan
cli/server.goTODO(deprecation)comment; register embedded gateway metrics withprometheus.WrapRegistererWithPrefix(aibridgemetrics.PrometheusMetricPrefix, ...).enterprise/cli/aibridgeproxyd.gocoder_ai_gateway_proxy_prefix; drop the unusedprometheusmetricsimport.coderd/prometheusmetrics/metricalias.go,metricalias_test.goscripts/metricsdocgen/scanner/prefix.goNewMetricAliasRegistererfromprefixFuncs.scripts/metricsdocgen/scanner/scanner_test.goWrapRegistererWithPrefix.scripts/metricsdocgen/README.mdNewMetricAliasRegisterermention.docs/ai-governance/ai-gateway/monitoring.mddocs/ai-governance/ai-gateway/rebranding-migration.mdRelease note: the
!title appliesrelease/breaking, so the change is listed under breaking changes in the v2.40 release notes.Verification:
make gen(no metrics reference changes),make lint,pnpm run format-docs,pnpm run lint-docs, doc-check and test-audit self-review, and targeted tests forenterprise/cli(AI Gateway / proxy),cli(AI Gateway),scripts/metricsdocgen, andcoderd/prometheusmetrics.Code written by @mollymaefraser, with Coder Agents used as a guide.