JonjubNet.Observability 1.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package JonjubNet.Observability --version 1.0.7
                    
NuGet\Install-Package JonjubNet.Observability -Version 1.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JonjubNet.Observability" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JonjubNet.Observability" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="JonjubNet.Observability" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JonjubNet.Observability --version 1.0.7
                    
#r "nuget: JonjubNet.Observability, 1.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JonjubNet.Observability@1.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JonjubNet.Observability&version=1.0.7
                    
Install as a Cake Addin
#tool nuget:?package=JonjubNet.Observability&version=1.0.7
                    
Install as a Cake Tool

JonjubNet.Observability

Biblioteca de observabilidad para aplicaciones .NET con soporte para Logging estructurado, Métricas y Tracing distribuido.


Resumen

Aspecto Detalle
Runtime .NET 10.0
Tipo Biblioteca NuGet
Licencia MIT
Versión actual 1.0.7

Tres pilares de observabilidad

Logging estructurado — 6 sinks (soporte multi-sink)

Sink Paquete
Console JonjubNet.Observability.Logging.Console
Serilog JonjubNet.Observability.Logging.Serilog
Kafka JonjubNet.Observability.Logging.Kafka
HTTP JonjubNet.Observability.Logging.Http
Elasticsearch JonjubNet.Observability.Logging.Elasticsearch
OpenTelemetry JonjubNet.Observability.Logging.OpenTelemetry

Métricas — 7 sinks (soporte multi-sink)

Sink Paquete
Prometheus JonjubNet.Observability.Metrics.Prometheus
InfluxDB JonjubNet.Observability.Metrics.InfluxDB
StatsD JonjubNet.Observability.Metrics.StatsD
Kafka JonjubNet.Observability.Metrics.Kafka
OpenTelemetry JonjubNet.Observability.Metrics.OpenTelemetry
Elasticsearch JonjubNet.Observability.Metrics.Elasticsearch
HTTP JonjubNet.Observability.Metrics.Http

Tracing distribuido — 4 exporters (soporte multi-exporter)

Exporter Paquete
OpenTelemetry JonjubNet.Observability.Tracing.OpenTelemetry
Kafka JonjubNet.Observability.Tracing.Kafka
Elasticsearch JonjubNet.Observability.Tracing.Elasticsearch
HTTP JonjubNet.Observability.Tracing.Http

Características principales

Característica Descripción
Múltiples sinks Soporte para múltiples sinks simultáneos por dominio (Logging/Metrics/Tracing)
Fast Path Pattern Clients escriben al Registry, sinks leen en background — mínimo overhead
Hexagonal Architecture Core (interfaces) → Infrastructure (sinks) → Presentation (hosting)
Correlación automática CorrelationId propagado en todos los protocolos
Resiliencia Retry Policy, Circuit Breaker, Dead Letter Queue
Seguridad Encriptación en tránsito y en reposo, TLS/SSL
Hot-reload config Configuración dinámica via IOptionsMonitor

Instalación

# Paquete completo (recomendado)
Install-Package JonjubNet.Observability -Version 1.0.7

# Solo Logging
Install-Package JonjubNet.Observability.Logging.Core -Version 1.0.7

# Solo Metrics
Install-Package JonjubNet.Observability.Metrics.Core -Version 1.0.7

# Solo Tracing
Install-Package JonjubNet.Observability.Tracing.Core -Version 1.0.7

Uso rápido

1. Registrar servicios

using JonjubNet.Observability.Hosting;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddJonjubNetLogging(builder.Configuration);
builder.Services.AddJonjubNetMetrics(builder.Configuration);
builder.Services.AddJonjubNetTracing(builder.Configuration);

2. Usar en código

public class OrderService
{
    private readonly ILoggingClient _logging;
    private readonly IMetricsClient _metrics;
    private readonly ITracingClient _tracing;

    public OrderService(
        ILoggingClient logging,
        IMetricsClient metrics,
        ITracingClient tracing)
    {
        _logging = logging;
        _metrics = metrics;
        _tracing = tracing;
    }

    public async Task<Order> CreateOrderAsync(OrderRequest request)
    {
        using var span = _tracing.StartSpan("create_order", SpanKind.Server);
        
        try
        {
            _metrics.Increment("orders_created_total", value: 1.0, tags: new() { ["status"] = "processing" });
            _logging.LogInformation("Creating order", category: "Orders", properties: new() { ["customerId"] = request.CustomerId });

            var order = await ProcessOrderAsync(request);

            span.Status = SpanStatus.Ok;
            return order;
        }
        catch (Exception ex)
        {
            _logging.LogError("Failed to create order", exception: ex, category: "Orders");
            span.Status = SpanStatus.Error;
            span.RecordException(ex);
            throw;
        }
    }
}

3. Configuración (múltiples sinks)

{
  "JonjubNet": {
    "Logging": {
      "Enabled": true,
      "Sinks": [
        { "Type": "Console", "Enabled": true, "Order": 1 },
        { "Type": "Elasticsearch", "Enabled": true, "Order": 2 }
      ]
    },
    "Metrics": {
      "Enabled": true,
      "Sinks": [
        { "Type": "Prometheus", "Enabled": true, "Order": 1 },
        { "Type": "InfluxDB", "Enabled": true, "Order": 2 }
      ]
    },
    "Tracing": {
      "Enabled": true,
      "Exporters": [
        { "Type": "OpenTelemetry", "Enabled": true, "Order": 1 },
        { "Type": "Kafka", "Enabled": true, "Order": 2 }
      ]
    }
  }
}

Legacy: Si Sinks está vacío, usa el campo único Sink (enum) para backward compatibility.


Arquitectura

Logging/           Core → interfaces, LoggingClient, LogRegistry
  Core/            Infrastructure → sinks (Console, Kafka, ES, OTel, HTTP)
  Infrastructure/
Metrics/           Core → interfaces, MetricsClient, MetricRegistry
  Core/            Infrastructure → sinks (Prometheus, InfluxDB, StatsD, Kafka, OTel, ES, HTTP)
  Infrastructure/
Tracing/           Core → interfaces, TracingClient, TraceRegistry
  Core/            Infrastructure → exporters (OTel, Kafka, ES, HTTP)
  Infrastructure/
Shared/            Context, Kafka, OpenTelemetry, Security, Utils
Presentation/      Hosting, middleware, NuGet package

Ver Arquitectura completa.


Documentación


Estado de implementación

Feature Estado
Logging estructurado ✅ 6 sinks
Métricas ✅ 7 sinks
Tracing distribuido ✅ 4 exporters
Multi-sink simultáneo
Correlación automática
Retry Policy
Circuit Breaker
Dead Letter Queue
Hot-reload config
Health checks
Encriptación

Ver Estado de implementación para detalles.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.14 93 7/14/2026
1.0.13 120 4/21/2026
1.0.12 116 4/13/2026
1.0.11 114 4/13/2026
1.0.10 116 4/13/2026
1.0.9 112 4/12/2026
1.0.8 117 4/12/2026
1.0.7 115 4/12/2026
1.0.6 149 1/11/2026
1.0.5 135 1/10/2026
1.0.4 128 1/10/2026
1.0.3 134 1/10/2026
1.0.2 140 1/5/2026
1.0.0 142 1/5/2026