ASP.NET Core Planned

The Nabd.AspNetCore package for server errors and slowness. Add the browser side from the matching web page.

Not available yet. These examples show the planned API; package and function names may change before the first release.

Server errors and slowness as the user sees them are measured in the browser, so this package is an addition, not a requirement.

Install

bash
dotnet add package Nabd.AspNetCore

Setup

Program.cs
builder.Services.AddNabd(options =>
{
    options.SecretKey = builder.Configuration["Nabd:SecretKey"]!;
    options.AppName = "My API";
    options.Environment = builder.Environment.EnvironmentName.ToLowerInvariant();
    options.SlowRequest = TimeSpan.FromSeconds(3);
});

var app = builder.Build();
app.UseNabd(); // after UseRouting

Secret key

bash (development)
dotnet user-secrets set "Nabd:SecretKey" "nb_sec_…"

Do not put it in appsettings.json or in code.

Frontend