.NET SDK
Install and configure ErrorDock in ASP.NET Core, worker, console and Windows desktop applications, on .NET Framework 4.7.2 or .NET 8 and later.
Release candidate: The .NET packages are published on NuGet at
0.1.0-rc.2. Pin that version when you install.
ErrorDock ships one package per kind of host. ErrorDock.Core targets netstandard2.0 and net8.0, so
it runs on .NET Framework 4.7.2 and on .NET 8, 9 and 10.
| Package | Use it for |
|---|---|
ErrorDock.AspNetCore |
ASP.NET Core applications, including Blazor Server |
ErrorDock.Extensions.Logging |
Worker and console applications on the generic host, through an ILogger provider |
ErrorDock.WinForms |
Windows Forms applications |
ErrorDock.Wpf |
WPF applications |
ErrorDock.Core |
Anything else: console tools, plug-ins, Avalonia, MAUI |
Install
dotnet add package ErrorDock.AspNetCore --version 0.1.0-rc.2
Configure
builder.Services.AddErrorDock(options => { options.ApiKey = builder.Configuration["ErrorDock:ApiKey"]; // ed_live_… options.Endpoint = "https://api.errordock.com"; options.Environment = builder.Environment.EnvironmentName; options.Release = typeof(Program).Assembly.GetName().Version?.ToString(); }); builder.Logging.AddErrorDock(); // optional ILogger bridge var app = builder.Build(); app.UseExceptionHandler("/error"); app.UseErrorDock(); // after the exception handler, before the endpoints
Middleware ordering
This is the detail most installations get wrong. Middleware wraps whatever is registered after it,
so an exception thrown by an endpoint travels outwards through the middleware in reverse order.
UseExceptionHandler converts it into a response, and anything registered before the exception
handler only ever sees the 500. UseErrorDock therefore goes after the exception handler and before
the endpoints, where the exception reaches it first:
app.UseExceptionHandler("/error"); // converts, outermost app.UseErrorDock(); // observes and re-throws, closer to the endpoints app.MapControllers();
The SDK never swallows an exception. It records and re-throws, so your own handling is unchanged.
Handled exceptions
Inject IErrorDockClient where you catch an exception you still want to see:
catch (PaymentDeclinedException ex) { errorDock.CaptureException(ex, "Payment declined"); return Result.Declined(); }
Outside dependency injection, the static form is ErrorDockSdk.Client.CaptureException(ex, …).
Symbols
Stack frames carry file and line only when portable PDBs are available to the runtime. Publish them alongside the application, or embed them:
<PropertyGroup> <DebugType>embedded</DebugType> </PropertyGroup>
ErrorDock records the stack trace the runtime produces. It does not symbolicate .NET frames on the server, so there is nothing to upload.
Performance
The .NET packages do not emit spans. Request and query timing come from OpenTelemetry: add the
ASP.NET Core and Entity Framework Core instrumentation, and deliver the spans as OTLP/HTTP with the
JSON encoding to https://api.errordock.com/api/v1/traces. Protobuf and gRPC are not accepted.
The .NET OTLP exporter sends gRPC or HTTP/protobuf only, so put an
OpenTelemetry Collector between the application and
ErrorDock. The application exports to the Collector as usual, and the Collector's otlphttp
exporter forwards with encoding: json:
exporters:
otlphttp/errordock:
traces_endpoint: https://api.errordock.com/api/v1/traces
encoding: json
headers:
Authorization: Bearer ed_live_...
The request and query spans then appear as endpoint percentiles and trace waterfalls, as described in Transactions.
What travels with an exception
Route, method, status code, correlation id, release and the authenticated user identifier. Header and body capture is allow-listed rather than blanket, because blanket capture is how personal data ends up in a monitoring system nobody classified as holding any.
Windows desktop
Install ErrorDock.Wpf or ErrorDock.WinForms at 0.1.0-rc.2. Use an application key (ed_app_) for a distributed desktop binary, never a secret server key.
Last updated October 20, 2026