Southport.Azure.Functions.Extensions
10.0.2
dotnet add package Southport.Azure.Functions.Extensions --version 10.0.2
NuGet\Install-Package Southport.Azure.Functions.Extensions -Version 10.0.2
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="Southport.Azure.Functions.Extensions" Version="10.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Southport.Azure.Functions.Extensions" Version="10.0.2" />
<PackageReference Include="Southport.Azure.Functions.Extensions" />
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 Southport.Azure.Functions.Extensions --version 10.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Southport.Azure.Functions.Extensions, 10.0.2"
#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 Southport.Azure.Functions.Extensions@10.0.2
#: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=Southport.Azure.Functions.Extensions&version=10.0.2
#tool nuget:?package=Southport.Azure.Functions.Extensions&version=10.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Southport.Azure.Functions.Extensions
A .NET library providing execution logging, monitoring, and utility extensions for Azure Functions (Isolated Worker model).
Features
- Execution Logging - Automatic function execution tracking with start/end times, status codes, and trigger values persisted to SQL Server
- Structured Logging - Serilog integration with SQL Server and Application Insights sinks
- Base Function Classes -
FunctionBase<TService>with built-in exception handling, logging, and concurrent execution prevention - Execution Results - Type-safe result pattern with Success, SuccessWithWarnings, and Failed status codes
- Queue Management - Azure Storage Queue client factory and poison queue requeuer service
- Log Maintenance - Automated cleanup of old execution logs
- Execution Digest - Email notifications for failed/warning executions via SendGrid or MailGun
- Health Checks - SQL Server health check integration
Installation
dotnet add package Southport.Azure.Functions.Extensions
Quick Start
1. Configure Services
var host = new HostBuilder()
.ConfigureFunctionsWebApplication()
.ConfigureServices((context, services) =>
{
var config = context.Configuration;
var connectionString = config["SqlConnectionString"];
// Register your SQL connection factory
services.AddScoped<ISqlConnectionFactory, YourSqlConnectionFactory>();
// Add execution logging with Serilog
services.AddExecutionLoggerStandardServices<ISqlConnectionFactory>(connectionString);
// Optional: Add queue services
services.AddQueueServices();
// Optional: Add health checks
services.AddHealthCheckServices(connectionString);
})
.Build();
2. Create a Function Using the Base Class
public class MyTimerFunction : FunctionBase<IMyService>
{
public MyTimerFunction(IMyService service, IExecutionLogger executionLogger, ILogger<MyTimerFunction> logger)
: base(service, executionLogger, logger)
{
}
[Function(nameof(MyTimerFunction))]
public async Task Run([TimerTrigger("0 */5 * * * *")] TimerInfo timer, FunctionContext context)
{
async Task<ExecutionResult> Function()
{
// Your business logic here
await Service.DoWorkAsync();
return ExecutionResult.Success();
}
await Run(context, Function);
}
}
3. Return Execution Results
// Success
return ExecutionResult.Success();
// Success with warnings
return ExecutionResult.SuccessWithWarnings("Some items were skipped");
// Failure
return ExecutionResult.Fail("Operation failed: " + errorMessage);
4. Log Only On Error (Optional)
For high-frequency functions where you only want to log failures:
await RunLogOnlyOnError(context, Function);
Database Setup
Create the required tables in your SQL Server database:
ExecutionLog Table
CREATE TABLE [dbo].[ExecutionLog] (
[Id] nvarchar(100) NOT NULL PRIMARY KEY,
[Function] nvarchar(50) NOT NULL,
[Start] datetime2(2) NOT NULL,
[End] datetime2(2) NULL,
[TriggerValue] nvarchar(max) NULL,
[StatusCode] smallint NULL
);
CREATE INDEX [IX_Execution_End] ON [dbo].[ExecutionLog] ([End]);
CREATE INDEX [IX_Execution_Function] ON [dbo].[ExecutionLog] ([Function]);
CREATE INDEX [IX_Execution_Start] ON [dbo].[ExecutionLog] ([Start]);
CREATE INDEX [IX_Execution_StatusCode] ON [dbo].[ExecutionLog] ([StatusCode]);
ApplicationLog Table
CREATE TABLE [dbo].[ApplicationLog] (
[Id] int IDENTITY(1,1) NOT NULL PRIMARY KEY,
[Message] nvarchar(max) NULL,
[MessageTemplate] nvarchar(max) NULL,
[Level] nvarchar(128) NULL,
[TimeStamp] datetimeoffset(7) NOT NULL,
[Exception] nvarchar(max) NULL,
[Function] nvarchar(100) NULL,
[Source] nvarchar(250) NULL,
[LogEvent] nvarchar(max) NULL,
[ExecutionLogId] nvarchar(100) NULL
);
CREATE INDEX [IX_ExecutionId] ON [dbo].[ApplicationLog] ([ExecutionLogId]);
Configuration
ExecutionLogging Options
{
"ExecutionLogging": {
"Schema": "dbo",
"ExecutionLogTable": "ExecutionLog",
"ApplicationLogTable": "ApplicationLog",
"ApplicationLogSource": "My Function App",
"ExecutionExpirationSeconds": 3600
}
}
ExecutionDigest Options (for email notifications)
{
"ExecutionDigest": {
"FromAddress": "noreply@example.com",
"Company": "My Company",
"ApplicationName": "My App"
}
}
Services
| Service | Description |
|---|---|
IExecutionLogger |
Tracks function execution lifecycle |
ILogMaintenanceService |
Cleans up expired execution logs |
IExecutionLogDigestService |
Sends email digests for failed executions |
IRequeuerService |
Moves messages from poison queues back to main queues |
IQueueClientFactory |
Creates Azure Storage Queue clients |
Status Codes
| Code | Value | Description |
|---|---|---|
Success |
0 | Function completed successfully |
SuccessWithWarnings |
1 | Function completed with warnings |
Failed |
2 | Function failed |
Requirements
- .NET 10.0
- Azure Functions Isolated Worker
- SQL Server (for execution logging)
License
Copyright © Southport Solutions, LLC. All rights reserved.
| Product | Versions 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.
-
net10.0
- AspNetCore.HealthChecks.SqlServer (>= 9.0.0)
- Azure.Storage.Queues (>= 12.25.0)
- Handlebars.Net (>= 2.1.6)
- Microsoft.Azure.Functions.Extensions (>= 1.1.0)
- Microsoft.Azure.Functions.Worker.ApplicationInsights (>= 2.50.0)
- Microsoft.Azure.Functions.Worker.Core (>= 2.51.0)
- Microsoft.Azure.Functions.Worker.Extensions.DurableTask (>= 1.14.0)
- Microsoft.Data.SqlClient (>= 6.1.4)
- Microsoft.DurableTask.Generators (>= 1.0.0)
- Serilog (>= 4.3.0)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Exceptions (>= 8.4.0)
- Serilog.Exceptions.MsSqlServer (>= 8.4.0)
- Serilog.Settings.Configuration (>= 10.0.0)
- Serilog.Sinks.ApplicationInsights (>= 5.0.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.MSSqlServer (>= 9.0.2)
- Southport.Messaging.Email.Core (>= 10.0.2)
- Southport.Messaging.Email.MailGun (>= 10.0.2)
- Southport.Messaging.Email.SendGrid (>= 10.0.0)
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 | |
|---|---|---|---|
| 10.0.2 | 0 | 2/6/2026 | |
| 10.0.1 | 62 | 2/4/2026 | |
| 10.0.0 | 128 | 1/2/2026 | |
| 8.0.0 | 316 | 8/23/2024 | |
| 2.3.0 | 229 | 2/18/2024 | |
| 2.2.6 | 739 | 11/16/2023 | |
| 2.2.5 | 518 | 8/30/2023 | |
| 2.2.4 | 254 | 8/28/2023 | |
| 2.2.3 | 625 | 3/14/2023 | |
| 2.2.2 | 564 | 2/18/2023 | |
| 2.2.1 | 398 | 2/18/2023 | |
| 2.1.3 | 399 | 2/16/2023 | |
| 2.1.2 | 490 | 1/30/2023 | |
| 2.1.1 | 576 | 12/29/2022 | |
| 2.1.0 | 422 | 12/29/2022 | |
| 2.0.3 | 511 | 12/16/2022 | |
| 2.0.2 | 453 | 12/15/2022 | |
| 2.0.1 | 444 | 12/15/2022 | |
| 2.0.0 | 484 | 11/30/2022 | |
| 1.2.1 | 967 | 6/29/2022 | |
| 1.2.0 | 707 | 6/27/2022 | |
| 1.1.5 | 1,273 | 2/2/2022 | |
| 1.1.4 | 1,405 | 9/29/2021 | |
| 1.1.4-beta2 | 493 | 9/29/2021 | |
| 1.1.4-beta1 | 474 | 9/29/2021 | |
| 1.1.3 | 1,248 | 9/1/2021 | |
| 1.1.3-beta2 | 424 | 9/1/2021 | |
| 1.1.3-beta1 | 465 | 9/1/2021 | |
| 1.1.2 | 1,285 | 8/13/2021 | |
| 1.1.0-beta1 | 561 | 8/13/2021 | |
| 1.0.26 | 1,373 | 8/9/2021 | |
| 1.0.26-beta1 | 681 | 8/1/2021 | |
| 1.0.25 | 1,506 | 7/25/2021 | |
| 1.0.24 | 1,642 | 4/2/2021 | |
| 1.0.23 | 1,709 | 3/19/2021 | |
| 1.0.20 | 1,715 | 2/7/2021 | |
| 1.0.19 | 1,337 | 2/6/2021 | |
| 1.0.18 | 1,440 | 2/6/2021 | |
| 1.0.17 | 1,004 | 2/6/2021 | |
| 1.0.16 | 826 | 2/4/2021 | |
| 1.0.15 | 858 | 1/16/2021 | |
| 1.0.14 | 790 | 1/16/2021 | |
| 1.0.13 | 874 | 1/16/2021 | |
| 1.0.12 | 861 | 1/11/2021 | |
| 1.0.10 | 974 | 12/10/2020 | |
| 1.0.9 | 849 | 12/8/2020 | |
| 1.0.8 | 896 | 12/7/2020 | |
| 1.0.7 | 854 | 12/7/2020 | |
| 1.0.6 | 1,069 | 12/7/2020 | |
| 1.0.1 | 886 | 11/19/2020 | |
| 1.0.0 | 812 | 11/19/2020 |
Update to net10.