mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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. |
|
||||
|
||||
Reference in New Issue
Block a user