QuackAlert

5xx errors in production?
You get notified fast by email.

Lightweight library for .NET that monitors your application and alerts you when something goes wrong.

$ dotnet add package QuackAlert
Compatible with .NET 8.0

Set up fast

Configure QuackAlert in two simple steps. No extra boilerplate.

1) Add configuration to appsettings.json

{
  "QuackAlert": {
    "Enabled": true,
    "Environment": "Production",
    "Email": {
      "SmtpHost": "smtp.gmail.com",
      "SmtpPort": 587,
      "SmtpUser": "your-email@gmail.com",
      "SmtpPassword": "your-app-password",
      "From": "your-email@gmail.com",
      "To": "recipient@email.com",
      "EnableSsl": true
    }
  }
}

In production environments, avoid storing sensitive email configuration values directly inappsettings.json

Prefer supplying these values through environment variables, for exampleQuackAlert__Email__SmtpPassword

Any values defined in appsettings.jsonwill be automatically overridden when the corresponding environment variables are provided

2) Register middleware in your startup pipeline

using QuackAlert.Extensions;

builder.Services.AddQuackAlert(options => {
    builder.Configuration.GetSection("QuackAlert").Bind(options);
};

var app = builder.Build();
app.UseQuackAlert();
© 2025 by João Victor