Class IdentityMetrics

Assembly: redb.Identity.Core.dll

F3: OpenTelemetry-compatible -based metrics for Identity. Exposed as a
Singleton and consumed from route processors. Meter name RedbIdentity can be picked
up by builder.Services.AddOpenTelemetry().WithMetrics(b => b.AddMeter("RedbIdentity"))
in the host process (Tsak.Worker) without any Identity-side dependency on OTEL packages.

Intentionally minimal: every counter / histogram represents an operational signal the
Identity SRE needs on day-one (login success/fail, MFA success/fail, token issue/revoke,
rate-limit rejections, password-verify latency). Call-sites use -local
instruments directly — no abstraction layer so we do not pay boxing / dispatch cost in the
auth hot path.

public sealed class IdentityMetrics : IDisposable

Inheritance

Object→IdentityMetrics

Implements

Properties

AuditWriteFailures

public Counter<long> AuditWriteFailures { get; }

DeliveryAttempts

public Counter<long> DeliveryAttempts { get; }

DeliveryEnqueueFailures

public Counter<long> DeliveryEnqueueFailures { get; }

LoginAttempts

public Counter<long> LoginAttempts { get; }

LoginFailures

public Counter<long> LoginFailures { get; }

MfaLockouts

public Counter<long> MfaLockouts { get; }

MfaVerifications

public Counter<long> MfaVerifications { get; }

PasswordVerifyDuration

public Histogram<double> PasswordVerifyDuration { get; }

RateLimitRejections

public Counter<long> RateLimitRejections { get; }

TokenErrors

public Counter<long> TokenErrors { get; }

TokensIssued

public Counter<long> TokensIssued { get; }

UniqueViolations

public Counter<long> UniqueViolations { get; }

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

ObserveDeliveryBacklog(DeliveryBacklog)

Publishes the outbox backlog as the gauges identity.delivery.pending and

public void ObserveDeliveryBacklog(DeliveryBacklog backlog)

Constructors