chore: correct AI Gateway metric provider label and cardinality notes (#28220)

The cardinality notes in `aibridge/metrics/metrics.go` assume the
`provider` label takes one of three values, and two for the key pool
metrics. That was accurate when the notes were written: `provider` is
the provider instance name, and the name defaulted to one of the three
provider types aibridge supports. Instances can now be given their own
names, so the label takes any configured name and the series counts
scale with the number of configured providers rather than being capped
at a fixed number.

The monitoring docs are also updated to make clear that `provider` is
the provider instance name.

Comments and documentation only, no behaviour change.

Follow-up to #28210.
This commit is contained in:
Susana Ferreira
2026-08-18 09:47:00 +00:00
committed by GitHub
parent 6079c514ee
commit db3566c1a3
2 changed files with 18 additions and 14 deletions
+3
View File
@@ -25,6 +25,9 @@ Each process exports metrics for the traffic that it handles:
Refer to [provider configuration](./providers.md) for the provider reload lifecycle these metrics describe.
The `provider` label is the provider instance name.
Some metrics use the explicit `provider_name` or `provider_type` labels for clarity.
| Metric | Type | Labels | Purpose |
|--------------------------------------------------------------------|-----------|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| `coder_ai_gateway_interceptions_total` | counter | `client`, `initiator_id`, `method`, `model`, `provider`, `route`, `status` | Intercepted requests. |