![]() |
VOOZH | about |
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" />Directory.Packages.props
<PackageReference Include="Mitf.Observability" />Project file
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.0Install as a Cake Addin
#tool nuget:?package=Mitf.Observability&version=1.0.0Install as a Cake Tool
MITF ASP.NET Core observability bootstrap for .NET 10 apps:
/metrics scrapingEverything is disabled by default and turned on via configuration.
dotnet add package Mitf.Observability
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>();
}
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.
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 |
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.
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 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 377 | 6/2/2026 |