QuackAlert 1.0.3
dotnet add package QuackAlert --version 1.0.3
NuGet\Install-Package QuackAlert -Version 1.0.3
<PackageReference Include="QuackAlert" Version="1.0.3" />
<PackageVersion Include="QuackAlert" Version="1.0.3" />
<PackageReference Include="QuackAlert" />
paket add QuackAlert --version 1.0.3
#r "nuget: QuackAlert, 1.0.3"
#:package QuackAlert@1.0.3
#addin nuget:?package=QuackAlert&version=1.0.3
#tool nuget:?package=QuackAlert&version=1.0.3
quackalert
QuackAlert is a lightweight monitoring and alert library for .NET applications, designed to capture HTTP 5xx errors and send real-time email notifications.
Nuget: https://www.nuget.org/packages/QuackAlert/
✨ Features
- Automatic HTTP 5xx error capture
- Simple configuration via Options Pattern
- Request tracking with duration and timestamp
📦 Installation
dotnet add package QuackAlert
Or via NuGet Package Manager:
Install-Package QuackAlert
🚀 Quick Start
1. Configuration via appsettings.json (Recommended)
{
"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
}
}
}
And in Program.cs:
using QuackAlert.Extensions;
using QuackAlert.Enums;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddQuackAlert(options =>
{
builder.Configuration.GetSection("QuackAlert").Bind(options);
});
var app = builder.Build();
// Add middleware
app.UseQuackAlert();
app.Run();
2. Configuration from Code
using QuackAlert.Extensions;
using QuackAlert.Enums;
var builder = WebApplication.CreateBuilder(args);
// Add QuackAlert
builder.Services.AddQuackAlert(options =>
{
options.Enabled = true;
options.Environment = EnvironmentType.Production;
options.Email.SmtpHost = "smtp.gmail.com";
options.Email.SmtpPort = 587;
options.Email.SmtpUser = "your-email@gmail.com";
options.Email.SmtpPassword = "your-app-password";
options.Email.From = "your-email@gmail.com";
options.Email.To = "recipient@email.com";
options.Email.EnableSsl = true;
});
var app = builder.Build();
// Add middleware
app.UseQuackAlert();
app.Run();
⚙️ Configuration
QuackAlertOptions
| Property | Type | Default | Description |
|---|---|---|---|
Enabled |
bool |
true |
Enables or disables QuackAlert |
Environment |
EnvironmentType |
Production |
Sets the environment (Development, Staging, Production) |
Email |
EmailOptions |
- | Email configuration settings |
EmailOptions
| Property | Type | Default | Description |
|---|---|---|---|
SmtpHost |
string |
"" |
SMTP server |
SmtpPort |
int |
587 |
SMTP port |
SmtpUser |
string |
"" |
SMTP username |
SmtpPassword |
string |
"" |
SMTP password |
From |
string |
"" |
Sender email address |
To |
string |
"" |
Recipient email address |
EnableSsl |
bool |
true |
Enables SSL/TLS |
Note: Email sending is only activated when Enabled = true AND Environment = Production.
📊 What Gets Captured
QuackAlert automatically monitors:
- ✅ HTTP response status
- ✅ Request path
- ✅ HTTP method (GET, POST, etc.)
- ✅ Request timestamp
- ✅ Request duration in milliseconds
- ✅ Unhandled exceptions
Email Example
When a 5xx error occurs, you'll receive a formatted HTML email containing:
{
"Timestamp": "2024-12-20T10:30:00Z",
"Path": "/api/users",
"Method": "POST",
"StatusCode": 500,
"DurationMs": 1250
}
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging (>= 8.0.1)
- Microsoft.Extensions.Options (>= 8.0.2)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.3 | 0 | 12/29/2025 |