API reference — Operations

Nuvora.Nexus.Sentinel.Diagnostics

OpenTelemetry instrumentation for Nuvora Nexus Sentinel: ActivitySource/Meter registration helpers and the meter-backed metrics implementation (logins, token mints, authorization checks, webhook deliveries)

dotnet add package Nuvora.Nexus.Sentinel.Diagnostics

Nuvora.Nexus.Sentinel.Diagnostics

MeterSentinelMetrics

public sealed class MeterSentinelMetrics : ISentinelMetrics

The meter-backed ISentinelMetrics: Core services call the port, this implementation turns the calls into instruments on SentinelTelemetry.Meter. Instruments:

  • logins_total{outcome} / login_duration (s) — password-login attempts.
  • token_mints_total{kind} — access/refresh token mints.
  • authz_checks_total{outcome} / authz_check_duration (s) — point authorization checks.
  • webhook_deliveries_total{outcome} — delivery attempts (delivered/retried/abandoned).

Methods

void RecordAuthzCheck(bool allowed, double durationSeconds)

One point authorization check (single evaluation path); outcome allowed/denied.

void RecordLogin(string outcome, double durationSeconds)

One password-login attempt: outcome is the snake_case LoginStatus (success, invalid_credentials, mfa_required, blocked, captcha_required).

void RecordTokenMint(string kind)

One token minted; kind ∈ access | refresh | single_purpose.

void RecordWebhookDelivery(string outcome)

One webhook delivery attempt; outcome ∈ delivered | retried | abandoned.

SentinelInstrumentationExtensions

public static class SentinelInstrumentationExtensions

One-liner helpers to light up Sentinel’s OpenTelemetry instrumentation, the same shape as Relay’s AddRelayInstrumentation. Three registrations compose the full picture:

services.AddSentinelInstrumentation();            // ISentinelMetrics → the Meter (before AddSentinel)
tracing.AddSentinelInstrumentation();             // spans
metrics.AddSentinelInstrumentation();             // instruments

Exporters are the application’s choice.

Methods

static IServiceCollection AddSentinelInstrumentation(this IServiceCollection services)

Registers the meter-backed ISentinelMetrics so Core’s hot paths (login, token mint, authz check, webhook delivery) actually record. TryAdd like every Sentinel registration — call BEFORE AddSentinel() so it wins over the noop default.

static MeterProviderBuilder AddSentinelInstrumentation(this MeterProviderBuilder builder)

Adds Sentinel metrics (logins, token mints, authz checks, webhook deliveries) to the meter provider.

static TracerProviderBuilder AddSentinelInstrumentation(this TracerProviderBuilder builder)

Adds Sentinel spans (ActivitySource Nuvora.Nexus.Sentinel) to the tracer provider.

SentinelTelemetry

public static class SentinelTelemetry

Sentinel’s own telemetry identities, mirroring Relay’s RelayTelemetry: one ActivitySource and one SentinelTelemetry.Meter, both named Nuvora.Nexus.Sentinel. Register them with AddSentinelInstrumentation(); the exporter is the application’s choice.

Fields

const string MeterName = "Nuvora.Nexus.Sentinel"

The Meter name — pass to MeterProviderBuilder.AddMeter (or use AddSentinelInstrumentation).

const string SourceName = "Nuvora.Nexus.Sentinel"

The ActivitySource name — pass to TracerProviderBuilder.AddSource (or use AddSentinelInstrumentation).

static readonly ActivitySource Source

Spans for Sentinel flows. Instrumented code creates activities through this source.

static readonly Meter Meter

The process-wide meter behind MeterSentinelMetrics.