Lyo.Job.Alerts 1.0.1

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

Lyo.Job.Alerts

Hosted JobAlertConsumer that subscribes to the job.notifications.alert routing key on the job.events exchange, deserializes JobAlertEvent payloads, and dispatches them through INotificationPublisher (in-process handlers) and/or an optional HTTP webhook.

Alert producers include JobService (SLA breaches), JobScheduler (failures, circuit breaker), and JobMaintenanceService (dead jobs, SLA scans) via IJobEventPublisher.PublishAlertAsync.

Examples

Register services

services.AddJobAlerts(configuration);

// Or inline options:
services.AddJobAlerts(o => {
    o.AlertWebhookUrl = "https://hooks.example.com/job-alerts";
});

Configuration (JobAlertsOptions.SectionName = "JobAlerts")

{
  "JobAlerts": {
    "AlertWebhookUrl": "https://hooks.example.com/job-alerts"
  }
}

Registration

Requires IMqService to be registered and connected. INotificationPublisher is optional — when absent, only the webhook path runs (if configured).

Configuration (JobAlertsOptions.SectionName = "JobAlerts")

Property Default Notes
AlertWebhookUrl null When set, each alert is POSTed as JSON to this URL.

Per-definition AlertWebhookUrl on JobDefinition is persisted for custom integrations but is not read by JobAlertConsumer — only JobAlertsOptions.AlertWebhookUrl (or INotificationPublisher handlers) dispatch alerts from this package.

Alert types (JobAlertType)

Type Typical source
Failure Scheduler after consecutive failures (AlertOnFailure)
CircuitBreakerTripped Scheduler disables definition
DeadJob Maintenance timeout (no heartbeat)
SlaBreach JobService start/finish SLA checks; maintenance SLA scan

JobAlertEvent payload

public sealed record JobAlertEvent(
    Guid DefinitionId,
    Guid? RunId,
    JobAlertType AlertType,
    string Message,
    DateTime Timestamp) : INotification;

Implement INotificationHandler<JobAlertEvent> (or your app's notification pipeline) when using INotificationPublisher.

Flow

flowchart LR
    pub[JobService / Scheduler / Maintenance] --> ex[job.events]
    ex -->|job.notifications.alert| q[job.notifications.alert queue]
    q --> c[JobAlertConsumer]
    c --> n[INotificationPublisher]
    c --> w[HTTP webhook]

Transient dispatch failures requeue the message (HandleMessageAsync returns true).

Metrics

  • job.scheduler.circuit_breaker.tripped
  • job.sla.breach (Constants.Metrics.Sla.Breach)
  • job.maintenance.dead_jobs.failed

Dependencies

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

  • Lyo.Job.Models — (direct, lyo)
  • Lyo.MessageQueue — (direct, lyo)
  • Lyo.Notification — (direct, lyo)
  • Microsoft.Extensions.Hosting.Abstractions 10.0.5 — (direct, microsoft)
  • Microsoft.Extensions.Http 10.0.5 — (direct, microsoft)
  • Microsoft.Extensions.Options.ConfigurationExtensions 10.0.5 — (direct, microsoft)
  • Lyo.Api.Models — (transitive, lyo)
  • Lyo.Common — (transitive, lyo)
  • Lyo.DateAndTime — (transitive, lyo)
  • Lyo.Exceptions — (transitive, lyo)
  • Lyo.Health — (transitive, lyo)
  • Lyo.Metrics — (transitive, lyo)
  • Lyo.Query.Models — (transitive, lyo)
  • Lyo.Result — (transitive, lyo)
  • Lyo.Schedule.Models — (transitive, lyo)
  • Microsoft.Extensions.DependencyInjection 10.0.5 — (transitive, microsoft)
  • Microsoft.Extensions.DependencyInjection.Abstractions 10.0.5 — (transitive, microsoft)
  • Microsoft.Extensions.Logging.Abstractions 10.0.5 — (transitive, microsoft)
  • System.Diagnostics.DiagnosticSource 10.0.5 — (transitive, microsoft, netstandard2.0)
  • System.Memory 4.6.3 — (transitive, microsoft, netstandard2.0)
  • System.Text.Json 10.0.5 — (transitive, microsoft, netstandard2.0)
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

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.1 32 8/18/2026
1.0.0 58 8/16/2026