Aspire.Seq 8.0.0-preview.7.24251.11

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This is a prerelease version of Aspire.Seq.
dotnet add package Aspire.Seq --version 8.0.0-preview.7.24251.11
NuGet\Install-Package Aspire.Seq -Version 8.0.0-preview.7.24251.11
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="8.0.0-preview.7.24251.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aspire.Seq --version 8.0.0-preview.7.24251.11
#r "nuget: Aspire.Seq, 8.0.0-preview.7.24251.11"
#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=8.0.0-preview.7.24251.11&prerelease

// Install Aspire.Seq as a Cake Tool
#tool nuget:?package=Aspire.Seq&version=8.0.0-preview.7.24251.11&prerelease

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

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
8.0.0-preview.7.24251.11 77 5/7/2024
8.0.0-preview.6.24214.1 94 4/23/2024
8.0.0-preview.5.24201.12 80 4/9/2024