You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sends logs, metrics and traces to opentelemetry collector
enrichment/augmentation of logs and traces even when exceptions occur
exceptions recorded on traces, client disconnects ignored
inject trace id to http requests
health checks (excluded from tracing)
best practices from aspire
servicediscovery
http resilience handler
Initialization in ASP.NET Core
builder.AddObservability();builder.Services.Configure<ObservabilityOptions>(options =>{options.TraceIdHeader="x-trace-id";options.Augment=(context,tags)=>{tags.Add("TenantId","extract from http context");returnValueTask.CompletedTask;};});
// required - register early, so exceptions from later middleware are enriched and handledapp.UseObservability();// optional - /health and /alive are anonymous, consider mapping them only in development or on an internal portapp.MapObservabilityHealthChecks();app.UseAuthorization();app.MapControllers();app.Run();