WorkerPanel.Net 1.0.0

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

WorkerPanel SDK

WorkerPanel is a lightweight, high-performance SDK for .NET Worker Services that provides observability and control for background workers.

It automatically captures:

  • Worker registration
  • Heartbeat metrics (CPU, memory, threads)
  • Logs
  • Job tracing
  • Queue metrics
  • Crash reporting
  • Distributed worker commands

The SDK is designed for high-throughput worker environments and integrates easily with existing .NET worker services.


Installation

Install via NuGet

dotnet add package WorkerPanel.Net

Or via Package Manager

Install-Package WorkerPanel.Net

Integration

Register WorkerPanel in your application during startup.

Program.cs

using WorkerPanel;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddWorkerPanel(
    serverUrl: "https://dashboard.yourdomain.com",
    apiKey: "YOUR_API_KEY");

var app = builder.Build();
app.Run();

This will automatically:

  • Register the worker instance
  • Start event pipelines
  • Enable logging integration
  • Enable tracing and monitoring

Configuration Options

All features are enabled by default but can be customized.

builder.Services.AddWorkerPanel(
    serverUrl: "https://dashboard.yourdomain.com",
    apiKey: "YOUR_API_KEY",
    options =>
    {
        options.Logging = true;
        options.ActivityTracing = true;
        options.CrashReporting = true;
        options.TaskExceptionTracking = true;
        options.Heartbeat = true;
        options.QueueMetrics = true;
    });

Available Options

Option Description
Logging Sends application logs to the dashboard
ActivityTracing Tracks distributed job execution
CrashReporting Reports unhandled application crashes
TaskExceptionTracking Detects unobserved task exceptions
Heartbeat Sends worker health metrics
QueueMetrics Enables queue monitoring

Logging

WorkerPanel integrates directly with the .NET logging system.

_logger.LogInformation("Email sent successfully");
_logger.LogError("Email failed");

Logs are automatically captured and sent to the dashboard.

Supported levels:

  • Information
  • Warning
  • Error
  • Debug
  • Critical

Job Tracing

WorkerPanel automatically tracks job execution using .NET Activity tracing.

This enables the dashboard to display:

  • Job start time
  • Job completion
  • Execution duration

Example worker loop:

while (!stoppingToken.IsCancellationRequested)
{
    await ProcessMessageAsync();
}

If Activity tracing is enabled, job execution events will automatically be reported.


Queue Metrics

You can report queue sizes to the dashboard.

_panel.ReportQueue("emailQueue", 150);

This allows dashboards to visualize:

  • Queue backlog
  • Worker load
  • Processing capacity

Crash Reporting

Unhandled application crashes are automatically captured.

Example captured events include:

  • Unhandled exceptions
  • Fatal runtime errors

These are sent as crash events to the dashboard.


Worker Commands

Workers can receive commands from the dashboard.

Supported commands:

Command Description
stop Stops the worker process
restart Restarts the worker process

Commands are automatically polled by the SDK.


Example Worker Service

using Microsoft.Extensions.Hosting;

public class EmailWorker : BackgroundService
{
    private readonly WorkerPanelClient _panel;
    private readonly ILogger<EmailWorker> _logger;

    public EmailWorker(
        WorkerPanelClient panel,
        ILogger<EmailWorker> logger)
    {
        _panel = panel;
        _logger = logger;
    }

    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
    {
        while (!stoppingToken.IsCancellationRequested)
        {
            try
            {
                await SendEmailAsync();

                _logger.LogInformation("Email sent");
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Email sending failed");
            }
        }
    }

    private Task SendEmailAsync()
    {
        return Task.Delay(100);
    }
}

Shutdown & Cleanup

WorkerPanel implements IDisposable.

When the application stops:

  • Background pipelines stop
  • Remaining events are flushed
  • HTTP resources are released

Cleanup happens automatically when the application shuts down.


What WorkerPanel Captures Automatically

Once integrated, the SDK automatically reports:

  • Worker registration
  • Heartbeat metrics
  • CPU usage
  • Memory usage
  • Thread count
  • Logs
  • Job traces
  • Queue metrics
  • Crashes
  • Worker commands

No additional instrumentation is required.


License

MIT License

Product 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. 
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.0 31 3/13/2026