Aspire.Seq 9.0.0

Prefix Reserved
dotnet add package Aspire.Seq --version 9.0.0                
NuGet\Install-Package Aspire.Seq -Version 9.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="Aspire.Seq" Version="9.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aspire.Seq --version 9.0.0                
#r "nuget: Aspire.Seq, 9.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.
// Install Aspire.Seq as a Cake Addin
#addin nuget:?package=Aspire.Seq&version=9.0.0

// Install Aspire.Seq as a Cake Tool
#tool nuget:?package=Aspire.Seq&version=9.0.0                

Aspire.Seq Library

Adds OTLP exporters to send logs and traces to a Seq server. Can be configured to persist logs and traces across application restarts.

By default, Seq is not added to the Aspire manifest for deployment.

Getting started

Prerequisites

  • Seq server

Install the package

Install the .NET Aspire Seq library with NuGet:

dotnet add package Aspire.Seq

Usage example

In the Program.cs file of your projects, call the AddSeqEndpoint extension method to register OpenTelemetry Protocol exporters to send logs and traces to Seq. The method takes a connection name parameter.

builder.AddSeqEndpoint("seq");

Logs and traces will then be sent to Seq, in addition to the .NET Aspire dashboard.

Configuration

The .NET Aspire Seq component provides options to configure the connection to Seq.

Use configuration providers

The .NET Aspire Seq component supports Microsoft.Extensions.Configuration. It loads the SeqSettings from configuration by using the Aspire:Seq key. Example appsettings.json that configures some of the options:

{
  "Aspire": {
    "Seq": {
      "DisableHealthChecks": true,
      "ServerUrl": "http://localhost:5341"
    }
  }
}

Use inline delegates

Also you can pass the Action<SeqSettings> configureSettings delegate to set up some or all the options inline, for example to disable health checks from code:

builder.AddSeqEndpoint("seq", settings => {
    settings.DisableHealthChecks = true;
    settings.ServerUrl = "http://localhost:5341";
    settings.Logs.TimeoutMilliseconds = 10000;
});

AppHost extensions

In your AppHost project, install the Aspire.Hosting.Seq library with NuGet:

dotnet add package Aspire.Hosting.Seq

Then, in the Program.cs file of AppHost, register a Seq server and propagate its configuration using the following methods (note that you must accept the Seq End User License Agreement for Seq to start):

var seq = builder.AddSeq("seq");

var myService = builder.AddProject<Projects.MyService>()
                       .WithReference(seq);

In the Program.cs file of MyService, logging and tracing to Seq can be configured with:

builder.AddSeqEndpoint("seq");

Persistent logs and traces

To retain Seq's data and configuration across application restarts register Seq with a data directory in your AppHost project.

var seq = builder.AddSeq("seq", seqDataDirectory: "./seqdata");

Note that the directory specified must already exist.

Seq in the .NET Aspire manifest

Seq is not part of the .NET Aspire deployment manifest. It is recommended to set up a secure production Seq server outside of .NET Aspire.

Additional documentation

Feedback & contributing

https://github.com/dotnet/aspire

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aspire.Seq:

Package Downloads
SimCube.Aspire

Default Service Extensions for Aspire Solution / Any .Net Solution that requires OTLP.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.0 528 11/12/2024
9.0.0-rc.1.24511.1 794 10/15/2024
8.2.2 1,730 10/24/2024
8.2.1 3,065 9/26/2024
8.2.0 2,980 8/29/2024
8.1.0 7,553 7/23/2024
8.0.2 1,058 6/28/2024
8.0.1 1,134 5/21/2024
8.0.0 153 5/21/2024
8.0.0-preview.7.24251.11 117 5/7/2024
8.0.0-preview.6.24214.1 524 4/23/2024
8.0.0-preview.5.24201.12 105 4/9/2024