Skip to content

Repository files navigation

Serilog.Sinks.Radianz

NuGet License: MIT

A Serilog sink that sends structured log events to Radianz — a developer activity analytics and observability platform that gives engineering teams real-time visibility into their development workflow, application health, and production behavior.

Installation

dotnet add package Serilog.Sinks.Radianz

Supports .NET 8 and .NET 10 (multi-target).

Quick Start

using Serilog;
using Serilog.Sinks.Radianz.Extensions;

Log.Logger = new LoggerConfiguration()
    .WriteTo.RadianzHttp(
        clientId: "your-client-id",
        apiKey: "your-api-key")
    .CreateLogger();

Log.Information("Hello from {AppName}!", "MyApp");

That's it. Logs are batched and sent asynchronously to Radianz — zero impact on your app's performance.

ASP.NET Core Integration

builder.Host.UseSerilog((ctx, lc) => lc
    .WriteTo.RadianzHttp(
        clientId: ctx.Configuration["Radianz:ClientId"],
        apiKey: ctx.Configuration["Radianz:ApiKey"])
    .WriteTo.Console());

Features

Feature Description
Async Batching Logs are buffered and sent in configurable batches (default 50 every 5 s)
Retry with Back-off Exponential back-off + jitter via Polly — survives transient failures
Structured Logging Full support for properties, scopes, and exception details
HTTP & Message Queue Choose REST API (default) or Azure Service Bus transport
Multi-target Single NuGet package for .NET 8 and .NET 10

Advanced Configuration

Custom Batching & Minimum Level

.WriteTo.RadianzHttp(
    clientId: "your-client-id",
    apiKey: "your-api-key",
    restrictedToMinimumLevel: LogEventLevel.Warning,
    batchSizeLimit: 100,
    batchPeriod: TimeSpan.FromSeconds(10))

Full Options via Action

.WriteTo.Radianz(options =>
{
    options.TransportType = RadianzTransportType.Http;
    options.HttpOptions = new HttpTransportOptions
    {
        ClientId = "your-client-id",
        ApiKey   = "your-api-key"
    };
    options.Batching.BatchSizeLimit = 100;
    options.Retry.MaxRetryAttempts  = 5;
})

Azure Service Bus Transport

.WriteTo.RadianzMessageQueue(
    connectionString: "Endpoint=sb://your-ns.servicebus.windows.net/;...",
    queueName: "radianz-logs")

Configuration Reference

Parameter Default Description
clientId Your Radianz client identifier
apiKey Your Radianz API key
restrictedToMinimumLevel Verbose Minimum log level to send
batchSizeLimit 50 Max events per batch
batchPeriod 5 s Max wait before flushing a batch
queueLimit 10 000 Max queued events before dropping

License

MIT

Releases

Packages

Contributors

Languages