Mitf.Observability
1.0.0
dotnet add package Mitf.Observability --version 1.0.0
NuGet\Install-Package Mitf.Observability -Version 1.0.0
<PackageReference Include="Mitf.Observability" Version="1.0.0" />
<PackageVersion Include="Mitf.Observability" Version="1.0.0" />
<PackageReference Include="Mitf.Observability" />
paket add Mitf.Observability --version 1.0.0
#r "nuget: Mitf.Observability, 1.0.0"
#:package Mitf.Observability@1.0.0
#addin nuget:?package=Mitf.Observability&version=1.0.0
#tool nuget:?package=Mitf.Observability&version=1.0.0
Mitf.Observability
MITF ASP.NET Core observability bootstrap for .NET 10 apps:
- Consul optional config source (KV bootstrap + reload)
- Serilog sinks: Console, Loki, PostgreSQL, Elasticsearch, SQL Server
- OpenTelemetry traces, metrics, logs, Prometheus
/metricsscraping
Everything is disabled by default and turned on via configuration.
Install
dotnet add package Mitf.Observability
Wire-up
using Observability.Hosting;
using Observability.Logger;
using Observability.Telemetry;
var builder = WebApplication.CreateBuilder(args);
builder.AddObservabilityBootstrap();
var app = builder.Build();
app.UseObservability();
if (builder.Configuration.GetValue("InternalLoggerOptions:Enabled", false))
{
app.UseMiddleware<ApiLoggingMiddleware>();
}
Configuration (appsettings.json)
{
"ConfigSource": {
"Type": "appsettings",
"ApplicationName": "my-service"
},
"InternalLoggerOptions": {
"Enabled": false,
"LogType": "Console",
"ConnectionString": "",
"TableName": "Logs_"
},
"Observability": {
"Enabled": false,
"ServiceName": "MyService.Api",
"CollectorUrl": "http://otel-collector:4317",
"EnableTracing": false,
"EnableMetrics": false,
"EnableLogging": false,
"PrometheusEndpoint": "/metrics"
}
}
When Observability:Enabled=true and all three sub-flags are false, tracing, metrics, and logging are auto-enabled.
Serilog LogType values
| Value | Connection string |
|---|---|
Console |
not required |
Loki |
http://loki:3100 |
PostGres |
PostgreSQL connection string |
Elastic |
http://elasticsearch:9200 |
Sql |
SQL Server connection string |
Docker observability stack
Pair with Consul, Loki, Tempo, Prometheus, Grafana, and OTEL Collector. See the insurance-provider-hub docker-compose.yml observability profile and infra/ configs as the reference template.
Publishing
Maintainers: run scripts/publish-mitf-observability.ps1 with a NuGet API key. See docs/hub/PUBLISH-MITF-OBSERVABILITY.md in the source repository.
| 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. |
-
net10.0
- Consul (>= 1.7.14.9)
- Destructurama.JsonNet (>= 2.0.1)
- HealthChecks.OpenTelemetry.Instrumentation (>= 1.1.0-dev.8)
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- OpenTelemetry.Exporter.Console (>= 1.12.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.12.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.6.0-rc.1)
- OpenTelemetry.Extensions.Hosting (>= 1.12.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.12.0)
- OpenTelemetry.Instrumentation.EntityFrameworkCore (>= 1.0.0-beta.7)
- OpenTelemetry.Instrumentation.Http (>= 1.12.0)
- OpenTelemetry.Instrumentation.Process (>= 1.12.0-beta.1)
- OpenTelemetry.Instrumentation.Runtime (>= 1.12.0)
- Serilog (>= 4.2.0)
- Serilog.AspNetCore (>= 9.0.0)
- Serilog.Extensions.Logging (>= 9.0.0)
- Serilog.Sinks.Elasticsearch (>= 10.0.0)
- Serilog.Sinks.Grafana.Loki (>= 8.3.1)
- Serilog.Sinks.MSSqlServer (>= 6.3.0)
- Serilog.Sinks.OpenTelemetry (>= 4.2.0)
- Serilog.Sinks.Postgresql.Alternative (>= 4.2.0)
- Winton.Extensions.Configuration.Consul (>= 3.4.0)
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.0 | 362 | 6/2/2026 |