Lyo.Diagnostic.AspNetCore 2.0.0

dotnet add package Lyo.Diagnostic.AspNetCore --version 2.0.0
                    
NuGet\Install-Package Lyo.Diagnostic.AspNetCore -Version 2.0.0
                    
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="Lyo.Diagnostic.AspNetCore" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lyo.Diagnostic.AspNetCore" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Lyo.Diagnostic.AspNetCore" />
                    
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 Lyo.Diagnostic.AspNetCore --version 2.0.0
                    
#r "nuget: Lyo.Diagnostic.AspNetCore, 2.0.0"
                    
#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 Lyo.Diagnostic.AspNetCore@2.0.0
                    
#: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=Lyo.Diagnostic.AspNetCore&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Lyo.Diagnostic.AspNetCore&version=2.0.0
                    
Install as a Cake Tool

Lyo.Diagnostic.AspNetCore

ASP.NET Core integration for Lyo.Diagnostic. Per-request scoped breadcrumb trails and exception recording to the in-memory error inbox plus structured logging, without replacing existing problem-details middleware.

Examples

Install

using Lyo.Diagnostic.AspNetCore;

builder.Services.AddLyoDiagnosticsWeb(o =>
{
    o.MinimumSeverity = Lyo.Diagnostic.Classification.ExceptionSeverity.Low;
    o.BreadcrumbCapacity = 100;
    o.InMemoryInboxMaxOccurrences = 5_000;
    o.CorrelationIdHeaders = ["X-Correlation-Id", "X-Request-Id"];
});

// After outer middleware that catches and formats errors (e.g. LoggingMiddleware):
app.UseDiagnosticExceptionRecording();

Controller breadcrumbs

public sealed class OrdersController(IBreadcrumbTrail breadcrumbs)
{
    public async Task<IActionResult> Get(string id)
    {
        breadcrumbs.Add("orders", "Loading order", new Dictionary<string, string> { ["id"] = id });
        // ...
    }
}

Order in the pipeline

  • Placed nearer the route handlers, this middleware is first in line when an exception unwinds.
  • It records the failure, calls IStructuredLogEnricher, then rethrows.
  • Problem Details / HTTP error bodies can still be built by outer middleware.

Options (DiagnosticWebOptions)

Property What it does
MinimumSeverity The inbox only stores occurrences at this severity or higher.
RecordExpectedControlFlow Expected control-flow classifications are skipped when this is false.
BreadcrumbCapacity Per-request breadcrumb ceiling (IBreadcrumbTrail).
InMemoryInboxMaxOccurrences Upper bound for the singleton InMemoryErrorInbox.
CorrelationIdHeaders Tried in order for RequestMetadata.CorrelationId; TraceIdentifier is the fallback.

Controller breadcrumbs

Resolve scoped IBreadcrumbTrail and record entries before risky work:

Keep secrets and PII out of breadcrumb data. See the Lyo.Diagnostic README.

Lyo.Api

AddLyoApiDiagnosticRecording on Lyo.Api wraps AddLyoDiagnosticsWeb.

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.Common.Core (direct, lyo)
  • Lyo.Diagnostic (direct, lyo)
  • Lyo.Common.Metadata (transitive, lyo)
  • Lyo.Exceptions (transitive, lyo)
  • Lyo.Hashing (transitive, lyo)
  • Lyo.PackageMetadata (transitive, lyo)
  • Microsoft.Bcl.AsyncInterfaces 10.0.5 (transitive, microsoft, netstandard2.0)
  • Microsoft.Extensions.DependencyInjection.Abstractions 10.0.5 (transitive, microsoft)
  • Microsoft.Extensions.Logging.Abstractions 10.0.5 (transitive, microsoft)
  • System.IO.Hashing 10.0.5 (transitive, microsoft, net10.0)
  • System.Memory 4.6.3 (transitive, microsoft, netstandard2.0)
  • System.Text.Json 10.0.5 (transitive, microsoft, netstandard2.0)
  • System.Threading.Tasks.Extensions 4.6.3 (transitive, microsoft)
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 (2)

Showing the top 2 NuGet packages that depend on Lyo.Diagnostic.AspNetCore:

Package Downloads
Lyo.Api

Core API library for building RESTful APIs with Entity Framework Core, caching, and mapping support.

Lyo.Authentication.Client

Consumer-side runtime for Lyo.Authentication. Used by Gateway / web hosts that need to redeem a Lyo handoff code, maintain a server-side session keyed by an HttpOnly cookie, project the signed-in Lyo user into Blazor's AuthenticationStateProvider, and inject a Bearer header on outbound API calls (with automatic refresh on 401). Pairs with the Lyo.Authentication.OpenIdConnect endpoints on the API side.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 159 9/9/2026
1.0.13 224 8/25/2026
1.0.11 251 8/23/2026
1.0.9 264 8/22/2026
1.0.6 321 8/20/2026
1.0.4 280 8/20/2026
1.0.3 219 8/19/2026
1.0.2 241 8/19/2026
1.0.1 216 8/18/2026
1.0.0 203 8/16/2026