Loading
Add NatsPartitioning and audit streaming SLIs
What does this MR do and why?
Add NatsPartitioning and Gitlab::Metrics::AuditEventStreamingSlis for audit event streaming
NatsPartitioning: deterministic mapping of a top-level group ID to one of PARTITION_COUNT subjects (group_id % PARTITION_COUNT), giving stable per-group FIFO ordering and bounded subject cardinality. Instance-scoped events (no root group) get a dedicated audit_events.streaming.instance subject and durable so they are isolated from tenant backlogs rather than sharing a numeric partition.- Gitlab::Metrics::AuditEventStreamingSlis: instrumentation for the pipeline. Fallback to Sidekiq is a plain degradation counter (fallbacks/attempts), not an error-rate SLI, so a degraded NATS path does not drain the Compliance error budget when delivery still succeeded via Sidekiq. Dispatch failures are a real error-rate SLI; consumer lag is an apdex SLI plus a raw histogram for quantiles. The SLIs pre-create every label combination at boot.
- Document the metrics in gitlab_metrics.md and application_slis.
These are pure helpers with no callers yet will be wired up in later changes.
Part of epic &17582
Related to #604455
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Huzaifa Iftikhar