Class MetricsSnapshotRegistration

Assembly: redb.Route.dll

Registration for , following the same order as every other
pluggable service here: what the context was told, then the DI container — and no default,
because the whole point is that nobody pays for the listener without asking for it.

public static class MetricsSnapshotRegistration

Inheritance

Object→MetricsSnapshotRegistration

Methods

AddMetricsSnapshot(IServiceCollection)

DI registration: services.AddMetricsSnapshot().

public static IServiceCollection AddMetricsSnapshot(this IServiceCollection services)

GetMetricsSnapshot(IRouteContext?)

Resolves the snapshot, or null when none was registered — there is deliberately no

public static IMetricsSnapshot? GetMetricsSnapshot(this IRouteContext? context)

UseMetricsSnapshot(IRouteContext)

Starts an in-process subscriber to the "redb.Route" meter on this context. The

public static IRouteContext UseMetricsSnapshot(this IRouteContext context)