feat(auth): count bulk RPC records by outcome
Every bulk upsert call now adds its per-record outcomes to iam_auth_batch_records_total{rpc, outcome} and logs one batch <rpc> call line with the same counts. A refused record never gets a log line of its own. BulkDelete returns no per-record outcomes, so it records neither.
The eight series the two RPCs can produce, three for clients and five for doorkeeper_refresh_tokens, exist at zero from startup, so rate() sees the first refusal after a restart. Each RPC gets every outcome in the enum except the ones it never produces. batch.Record does the counting and the log line. server.InitBatchMetrics registers the counter from auth.NewComponents, because batch is internal to the server tree.
docs/metrics.md describes the counter and a query to read it.
Part 14 of 14. The full change is in !959 (closed), the integration MR, kept open for the big picture.
- !988 (merged) feat(proto): add BulkUpsertClients and UpsertResult (merged)
- !989 (merged) feat(auth): add BulkUpsertClients with per-record results (merged)
- !990 (merged) refactor(auth): move the bulk record helpers to internal/batch (merged)
- !1010 (merged) fix(auth): decide refresh-token upserts in Go (merged)
- !1029 (merged) fix(auth): gate stored rows in one upsert helper and wait on the lock (merged)
- !1030 (merged) feat(auth): add a batch path to the refresh-token repository (merged)
- !1031 (merged) feat(proto): add BulkUpsert to the refresh-token service (merged)
- !991 (merged) feat(auth): add refresh-token BulkUpsert with per-record results (merged)
- !1069 (merged) feat(auth): refuse upserts for deleted refresh-token ids (merged)
- !992 (merged) feat(auth): add refresh-token BulkDelete (merged)
- !1110 (merged) feat(auth): mark a deleted client's refresh tokens before the cascade
- !993 (merged) feat(auth): add refresh-token GetState
- !1118 (merged) test(auth): drive the refresh-token bulk RPCs through the server
- !994 (merged) feat(auth): count bulk RPC records by outcome <- this MR
Previous: !1118 (merged)