Referencia Pública de API .NETL2 Transversal y FiabilidadNo publicadoAOT: Completo

EricksonLopez.Observability

Early-stage local-only OpenTelemetry and structured diagnostics prototype (not yet published to GitHub or NuGet).

1 namespaces8 tipos60 miembrosGenerado desde XML docs y ensamblados · UTC 2026-12-01

Mostrando 8 de 8 tipos (60 miembros)

EricksonLopez.Observability#

8
record

BurnRateWindow

Ensamblado: EricksonLopez.Observability
public readonly record struct BurnRateWindow(string Name, TimeSpan LongWindow, TimeSpan ShortWindow, decimal BurnRateThreshold, ErrorBudgetAction SeverityAction)

Represents a Google SRE multi-window burn-rate alerting rule paired with an `SloDescriptor`.

Miembros (6)

  • constructorBurnRateWindow
    public BurnRateWindow(string Name, TimeSpan LongWindow, TimeSpan ShortWindow, decimal BurnRateThreshold, ErrorBudgetAction SeverityAction)

    Initializes a new instance of BurnRateWindow.

    Name: string
    Identifier of the burn window (e.g., `"fast-1h-5m"`).
    LongWindow: TimeSpan
    Primary observation window (e.g., 1 hour or 6 hours).
    ShortWindow: TimeSpan
    Confirmation short window (typically 1/12th of `LongWindow`).
    BurnRateThreshold: decimal
    Dimensionless burn-rate multiplier (e.g., `14.4m`, `6.0m`, `1.0m`).
    SeverityAction: ErrorBudgetAction
    Action triggered when both windows exceed `BurnRateThreshold`.
  • propertyBurnRateThreshold
    public decimal BurnRateThreshold { get; init; }

    Dimensionless burn-rate multiplier (e.g., `14.4m`, `6.0m`, `1.0m`).

  • propertyLongWindow
    public TimeSpan LongWindow { get; init; }

    Primary observation window (e.g., 1 hour or 6 hours).

  • propertyName
    public string Name { get; init; }

    Identifier of the burn window (e.g., `"fast-1h-5m"`).

  • propertySeverityAction
    public ErrorBudgetAction SeverityAction { get; init; }

    Action triggered when both windows exceed `BurnRateThreshold`.

  • propertyShortWindow
    public TimeSpan ShortWindow { get; init; }

    Confirmation short window (typically 1/12th of `LongWindow`).

enum

ErrorBudgetAction

Ensamblado: EricksonLopez.Observability
public enum ErrorBudgetAction

Recommended operational governance action determined by `ErrorBudgetPolicy`.

Miembros (4)

  • fieldAlert
    Alert = 2

    Fast multi-window burn rate breach; page on-call SRE immediately.

  • fieldExhaustedFreeze
    ExhaustedFreeze = 3

    Error budget exhausted or critical 14.4x burn rate; enforce release freeze except P0/reliability fixes.

  • fieldHealthy
    Healthy = 0

    Error budget consumption is within sustainable bounds (<= 1x burn rate).

  • fieldWarning
    Warning = 1

    Elevated burn rate or low remaining budget; create ticket / review recent deployments.

record

ErrorBudgetEvaluation

Ensamblado: EricksonLopez.Observability
public readonly record struct ErrorBudgetEvaluation(string SloId, decimal ObservedGoodRatio, decimal ObservedErrorRatio, decimal TargetRatio, decimal RemainingBudgetRatio, TimeSpan RemainingBudgetDuration, decimal CurrentBurnRate, bool IsBudgetExhausted, ErrorBudgetAction RecommendedAction)

Represents the computed result of evaluating observed traffic/events against an `SloDescriptor`.

Miembros (11)

  • constructorErrorBudgetEvaluation
    public ErrorBudgetEvaluation(string SloId, decimal ObservedGoodRatio, decimal ObservedErrorRatio, decimal TargetRatio, decimal RemainingBudgetRatio, TimeSpan RemainingBudgetDuration, decimal CurrentBurnRate, bool IsBudgetExhausted, ErrorBudgetAction RecommendedAction)

    Initializes a new instance of ErrorBudgetEvaluation.

    SloId: string
    Identifier of the evaluated SLO.
    ObservedGoodRatio: decimal
    Observed good-event compliance ratio in `[0, 1]`.
    ObservedErrorRatio: decimal
    Observed bad-event ratio (`1 - ObservedGoodRatio`).
    TargetRatio: decimal
    Configured target compliance ratio.
    RemainingBudgetRatio: decimal
    Remaining fraction of error budget in `[0, 1]` (`0` when exhausted).
    RemainingBudgetDuration: TimeSpan
    Remaining error budget expressed as a `TimeSpan`.
    CurrentBurnRate: decimal
    Ratio of `ObservedErrorRatio` to allowed error budget (`1.0` = consuming budget exactly on schedule).
    IsBudgetExhausted: bool
    Whether the error budget has been completely depleted.
    RecommendedAction: ErrorBudgetAction
    Operational action determined by `ErrorBudgetPolicy`.
  • propertyCurrentBurnRate
    public decimal CurrentBurnRate { get; init; }

    Ratio of `ObservedErrorRatio` to allowed error budget (`1.0` = consuming budget exactly on schedule).

  • propertyIsBudgetExhausted
    public bool IsBudgetExhausted { get; init; }

    Whether the error budget has been completely depleted.

  • propertyIsCompliant
    public bool IsCompliant { get; }

    Gets a value indicating whether `ObservedGoodRatio` meets or exceeds `TargetRatio`.

  • propertyObservedErrorRatio
    public decimal ObservedErrorRatio { get; init; }

    Observed bad-event ratio (`1 - ObservedGoodRatio`).

  • propertyObservedGoodRatio
    public decimal ObservedGoodRatio { get; init; }

    Observed good-event compliance ratio in `[0, 1]`.

  • propertyRecommendedAction
    public ErrorBudgetAction RecommendedAction { get; init; }

    Operational action determined by `ErrorBudgetPolicy`.

  • propertyRemainingBudgetDuration
    public TimeSpan RemainingBudgetDuration { get; init; }

    Remaining error budget expressed as a `TimeSpan`.

  • propertyRemainingBudgetRatio
    public decimal RemainingBudgetRatio { get; init; }

    Remaining fraction of error budget in `[0, 1]` (`0` when exhausted).

  • propertySloId
    public string SloId { get; init; }

    Identifier of the evaluated SLO.

  • propertyTargetRatio
    public decimal TargetRatio { get; init; }

    Configured target compliance ratio.

class

ErrorBudgetPolicy

Ensamblado: EricksonLopez.Observability
public sealed class ErrorBudgetPolicy

Evaluates observed event counts or SLI ratios against `SloDescriptor` targets to compute burn rates, remaining error budget, and release-governance actions.

Miembros (8)

  • constructorErrorBudgetPolicy
    public ErrorBudgetPolicy(decimal warningBurnRateThreshold = 1.0m, decimal alertBurnRateThreshold = 6.0m, decimal criticalBurnRateThreshold = 14.4m, decimal lowRemainingBudgetWarningRatio = 0.25m)

    Initializes a new instance of the `ErrorBudgetPolicy` class.

    warningBurnRateThreshold: decimal
    alertBurnRateThreshold: decimal
    criticalBurnRateThreshold: decimal
    lowRemainingBudgetWarningRatio: decimal
  • methodEvaluate
    public Result<ErrorBudgetEvaluation> Evaluate(SloDescriptor descriptor, long totalEvents, long badEvents)

    Evaluates error budget health from raw total and bad event counts.

    descriptor: SloDescriptor
    totalEvents: long
    badEvents: long
  • methodEvaluateFromGoodRatio
    public Result<ErrorBudgetEvaluation> EvaluateFromGoodRatio(SloDescriptor descriptor, decimal observedGoodRatio)

    Evaluates error budget health from an observed compliance ratio in `[0, 1]`.

    descriptor: SloDescriptor
    observedGoodRatio: decimal
  • propertyAlertBurnRateThreshold
    public decimal AlertBurnRateThreshold { get; }

    Gets the burn-rate multiplier that triggers `ErrorBudgetAction.Alert` (default `6.0`).

  • propertyCriticalBurnRateThreshold
    public decimal CriticalBurnRateThreshold { get; }

    Gets the burn-rate multiplier that triggers `ErrorBudgetAction.ExhaustedFreeze` (default `14.4`).

  • propertyDefault
    public static ErrorBudgetPolicy Default { get; }

    Gets the default SRE error budget policy (`1.0x` warning, `6.0x` alert, `14.4x` freeze, `25%` low-budget warning).

  • propertyLowRemainingBudgetWarningRatio
    public decimal LowRemainingBudgetWarningRatio { get; }

    Gets the remaining budget ratio below which `ErrorBudgetAction.Warning` is raised even at low burn (default `0.25`).

  • propertyWarningBurnRateThreshold
    public decimal WarningBurnRateThreshold { get; }

    Gets the burn-rate multiplier that triggers `ErrorBudgetAction.Warning` (default `1.0`).

enum

SliKind

Ensamblado: EricksonLopez.Observability
public enum SliKind

Categorizes the Service Level Indicator (SLI) dimension measured by an `SloDescriptor`.

Miembros (5)

  • fieldAvailability
    Availability = 0

    Ratio of successful (non-5xx) responses to total requests.

  • fieldCorrectness
    Correctness = 4

    Data or transactional correctness ratio objective.

  • fieldFreshness
    Freshness = 2

    Ratio of asynchronous pipeline/outbox events processed within a freshness lag window.

  • fieldLatency
    Latency = 1

    Ratio of requests completing within a target latency quantile threshold.

  • fieldThroughput
    Throughput = 3

    Sustained throughput capacity objective.

record

SloDescriptor

Ensamblado: EricksonLopez.Observability
public sealed record SloDescriptor

Declarative, immutable Service Level Objective (SLO) specification with computed error budget math.

Miembros (14)

  • methodCreate
    public static Result<SloDescriptor> Create(string sloId, string serviceName, string displayName, SliKind kind, decimal targetRatio, TimeSpan? rollingWindow = null, double? thresholdValue = null, string unit = "", IReadOnlyList<BurnRateWindow>? burnRateWindows = null)

    Creates a validated `SloDescriptor` instance.

    sloId: string
    serviceName: string
    displayName: string
    kind: SliKind
    targetRatio: decimal
    rollingWindow: TimeSpan?
    thresholdValue: double?
    unit: string
    burnRateWindows: IReadOnlyList<BurnRateWindow>?
  • propertyAllowedErrorRatio
    public decimal AllowedErrorRatio { get; }

    Gets the allowed error fraction (`1 - TargetRatio`).

  • propertyBurnRateWindows
    public IReadOnlyList<BurnRateWindow> BurnRateWindows { get; }

    Gets the configured multi-window burn-rate thresholds.

  • propertyDefaultBurnRateWindows
    public static IReadOnlyList<BurnRateWindow> DefaultBurnRateWindows { get; }

    Gets standard Google SRE multi-window multi-burn-rate thresholds (`14.4x`, `6x`, `1x`).

  • propertyDisplayName
    public string DisplayName { get; }

    Gets the human-readable title of the SLO.

  • propertyKind
    public SliKind Kind { get; }

    Gets the SLI category.

  • propertyRollingWindow
    public TimeSpan RollingWindow { get; }

    Gets the rolling compliance window (e.g., 30 days).

  • propertyServiceName
    public string ServiceName { get; }

    Gets the logical service or bounded-context name.

  • propertySloId
    public string SloId { get; }

    Gets the canonical identifier (e.g., `"api-availability"`).

  • propertyTargetRatio
    public decimal TargetRatio { get; }

    Gets the target compliance ratio in `(0, 1]` (e.g., `0.999m` for 99.9%).

  • propertyThresholdValue
    public double? ThresholdValue { get; }

    Gets the optional SLI threshold (e.g., `200` ms for P95 latency or `30` s for outbox freshness lag).

  • propertyTotalErrorBudget
    public TimeSpan TotalErrorBudget { get; }

    Gets the total allowable downtime/error duration over `RollingWindow`.

  • propertyTotalErrorBudgetMinutes
    public double TotalErrorBudgetMinutes { get; }

    Gets the total allowable error budget in minutes over `RollingWindow`.

  • propertyUnit
    public string Unit { get; }

    Gets the unit of `ThresholdValue` (e.g., `"ms"`, `"s"`, `"ratio"`).

class

SloTelemetryInstruments

Ensamblado: EricksonLopez.Observability
public sealed class SloTelemetryInstruments : IDisposable
Implementa: IDisposable

Provides strongly-typed OpenTelemetry-compatible `Diagnostics.Metrics` SLI and business telemetry instruments.

Miembros (8)

  • constructorSloTelemetryInstruments
    public SloTelemetryInstruments(string meterName = "", string version = "")

    Initializes a new instance of the `SloTelemetryInstruments` class.

    meterName: string
    Meter name registered in OpenTelemetry (defaults to `"EricksonLopez.Observability"`).
    version: string
    Optional semantic meter version.
  • methodDispose
    public void Dispose()

    Inherits documentation from base type or interface.

  • methodRecordOutcome
    public void RecordOutcome(string sloId, string operation, bool isGood, double? durationSeconds = null)

    Records an SLI event outcome with standardized `slo.id` and `operation` tags.

    sloId: string
    operation: string
    isGood: bool
    durationSeconds: double?
  • propertyFreshnessLagSeconds
    public Histogram<double> FreshnessLagSeconds { get; }

    Gets the histogram recording pipeline/outbox freshness lag in seconds (`sli.freshness.lag`).

  • propertyMeterName
    public string MeterName { get; }

    Gets the underlying `Metrics.Meter` name.

  • propertyOperationDurationSeconds
    public Histogram<double> OperationDurationSeconds { get; }

    Gets the histogram recording operation duration in seconds (`sli.operation.duration`).

  • propertySliBadEvents
    public Counter<long> SliBadEvents { get; }

    Gets the counter tracking failed/bad SLI operations (`sli.events.bad`).

  • propertySliTotalEvents
    public Counter<long> SliTotalEvents { get; }

    Gets the counter tracking total SLI-eligible operations (`sli.events.total`).

class

StandardSloCatalog

Ensamblado: EricksonLopez.Observability
public static class StandardSloCatalog

Factory presets for canonical enterprise platform SLOs (availability, P95/P99 latency, and outbox data freshness).

Miembros (4)

  • methodCreateApiAvailability
    public static SloDescriptor CreateApiAvailability(string serviceName, decimal targetRatio = 0.999m)

    Creates a 99.9% 30-day HTTP availability SLO (43.2 minutes monthly error budget).

    serviceName: string
    targetRatio: decimal
  • methodCreateApiLatencyP95
    public static SloDescriptor CreateApiLatencyP95(string serviceName, double targetMilliseconds = 200d, decimal targetRatio = 0.95m)

    Creates a P95 HTTP latency SLO (default 200 ms @ 95%).

    serviceName: string
    targetMilliseconds: double
    targetRatio: decimal
  • methodCreateApiLatencyP99
    public static SloDescriptor CreateApiLatencyP99(string serviceName, double targetMilliseconds = 500d, decimal targetRatio = 0.99m)

    Creates a P99 HTTP latency SLO (default 500 ms @ 99%).

    serviceName: string
    targetMilliseconds: double
    targetRatio: decimal
  • methodCreateOutboxFreshness
    public static SloDescriptor CreateOutboxFreshness(string serviceName, double maxLagSeconds = 30d, decimal targetRatio = 0.995m)

    Creates an asynchronous Outbox/Inbox data freshness SLO (default max lag 30 s @ 99.5%).

    serviceName: string
    maxLagSeconds: double
    targetRatio: decimal

Buscar en el Ecosistema EricksonLopez.*

Escribe el nombre de una librería, ID de paquete NuGet, tipo .NET o concepto arquitectónico para buscar en el portal.