Hellnet.Observability
1.3.13
dotnet add package Hellnet.Observability --version 1.3.13
NuGet\Install-Package Hellnet.Observability -Version 1.3.13
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="Hellnet.Observability" Version="1.3.13" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hellnet.Observability" Version="1.3.13" />
<PackageReference Include="Hellnet.Observability" />
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 Hellnet.Observability --version 1.3.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hellnet.Observability, 1.3.13"
#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 Hellnet.Observability@1.3.13
#: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=Hellnet.Observability&version=1.3.13
#tool nuget:?package=Hellnet.Observability&version=1.3.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Hellnet Observability
Library de observabilidade para microsservicos .NET 10, baseada em OpenTelemetry com structured logging (Serilog), distributed tracing e metrics — setup em 1 linha, native OTel API.
dotnet add package Hellnet.Observability
Quick start
export HELLNET_SERVICE_NAME=my-service
export HELLNET_OTLP_ENDPOINT=http://alloy.monitoring:4318
export HELLNET_OTLP_PROTOCOL=http
using Hellnet.Observability;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHellnetTelemetry();
var app = builder.Build();
app.UseHellnetObservability();
app.UseHellnetHealthChecks();
app.Run();
Usage
All-in-one (recomendado)
builder.Services.AddHellnetTelemetry();
Registra logging, tracing, metrics, health checks e ITelemetry em 1 chamada.
Pipelines individuais
builder.Services.AddHellnetLogging(); // Serilog + OTLP
builder.Services.AddHellnetTracing(t => ...); // OTel tracing
builder.Services.AddHellnetMetrics(m => ...); // OTel metrics
builder.Services.AddHellnetHealthChecks(); // /live, /ready, /health
Injetar telemetry em qualquer lugar
public class OrderService(ITelemetry tel)
{
public async Task Process(Order order)
{
using var span = tel.ActivitySource.StartActivity("process-order");
span?.SetTag("order.id", order.Id);
tel.Logger<OrderService>().LogInformation("Processing {Id}", order.Id);
tel.Meter.CreateCounter<long>("orders.processed").Add(1);
tel.Meter.CreateHistogram<double>("order.value").Record((double)order.Total);
}
}
Health checks
// Endpoints (depois de UseHellnetHealthChecks):
// GET /live — liveness probe (self check)
// GET /ready — readiness probe (self + OTLP collector)
// GET /health — aggregate
// Adicionar custom checks:
builder.Services.AddHellnetHealthChecks(checks =>
checks.AddCheck("db", new MyDbCheck(), tags: ["ready"]));
Custom tracing source
builder.Services.AddHellnetTracing(t =>
t.AddSource("MyApp.CustomTraces"));
Custom meter
builder.Services.AddHellnetMetrics(m =>
m.AddMeter("MyApp.CustomMetrics"));
Resiliencia (Polly)
Health check do OTLP collector usa retry (2x) + timeout (3s).
Configuravel via HellnetResilience:
HellnetResilience.RetryCount = 5;
HellnetResilience.TimeoutDuration = TimeSpan.FromSeconds(10);
Required env vars
| Variable | Exemplo | Descricao |
|---|---|---|
HELLNET_SERVICE_NAME |
order-api |
Service identifier |
HELLNET_OTLP_ENDPOINT |
http://alloy.monitoring:4318 |
OTLP collector endpoint (HTTP) |
HELLNET_OTLP_PROTOCOL |
http |
Transport protocol (http or grpc) |
Fail-fast: a aplicacao nao inicia sem essas tres.
| Variable | Default | Descricao |
|---|---|---|
HELLNET_LOG_LEVEL |
Information |
Minimo level de log |
HELLNET_ENV_FILE |
— | Caminho do .env em development |
Instrumentacao automatica
| Camada | Package |
|---|---|
| HTTP (incoming) | OpenTelemetry.Instrumentation.AspNetCore |
| HTTP (outgoing) | OpenTelemetry.Instrumentation.Http |
| Database | OpenTelemetry.Instrumentation.EntityFrameworkCore |
| SQL | OpenTelemetry.Instrumentation.SqlClient |
| Runtime | OpenTelemetry.Instrumentation.Runtime |
| Process | OpenTelemetry.Instrumentation.Process |
Inclusas por padrao no AddHellnetTelemetry().
Tech stack
| Categoria | Library |
|---|---|
| OTel | OpenTelemetry SDK 1.16.0 + OTLP exporter |
| Logging | Serilog 4.3.1 (compact JSON, async console) |
| Resilience | Polly.Core 8.7.0 |
| .NET | 10.0, C# 14 |
Licenca
Apache 2.0 (c) 2026 Hellnet
| Product | Versions 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.
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.9)
- OpenTelemetry (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- OpenTelemetry.Extensions.Hosting (>= 1.16.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.16.0)
- OpenTelemetry.Instrumentation.Http (>= 1.16.0)
- OpenTelemetry.Instrumentation.Runtime (>= 1.16.0)
- OpenTelemetry.Instrumentation.SqlClient (>= 1.16.0)
- Polly.Core (>= 8.7.0)
- Serilog (>= 4.3.1)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Process (>= 3.0.0)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Exceptions (>= 8.4.0)
- Serilog.Extensions.Hosting (>= 10.0.0)
- Serilog.Extensions.Logging (>= 10.0.0)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Sinks.Async (>= 2.1.0)
- Serilog.Sinks.Console (>= 6.1.1)
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.3.13 | 123 | 7/17/2026 |
| 1.3.12 | 101 | 7/17/2026 |
| 1.3.10 | 102 | 7/16/2026 |
| 1.3.9 | 107 | 7/16/2026 |
| 1.3.4 | 108 | 7/9/2026 |
| 1.3.2-beta.39 | 61 | 7/9/2026 |
| 1.3.2-beta.38 | 56 | 7/9/2026 |
| 1.3.2-beta.37 | 58 | 7/9/2026 |
| 1.3.2-beta.36 | 57 | 7/9/2026 |
| 1.3.2-beta.35 | 60 | 7/9/2026 |
| 1.3.2-beta.34 | 61 | 7/9/2026 |
| 1.3.2-beta.33 | 55 | 7/9/2026 |
| 1.3.2-beta.32 | 56 | 7/9/2026 |
| 1.3.2-beta.31 | 56 | 7/9/2026 |
| 1.3.2-beta.30 | 58 | 7/9/2026 |
| 1.3.2-beta.29 | 71 | 7/9/2026 |
| 1.3.2-beta.28 | 56 | 7/9/2026 |
| 1.3.2-beta.27 | 64 | 7/9/2026 |
| 1.3.2-beta.26 | 61 | 7/9/2026 |
| 1.3.2-beta.25 | 67 | 7/9/2026 |
Loading failed