Aspire.Seq
8.1.0
Prefix Reserved
See the version list below for details.
dotnet add package Aspire.Seq --version 8.1.0
NuGet\Install-Package Aspire.Seq -Version 8.1.0
<PackageReference Include="Aspire.Seq" Version="8.1.0" />
paket add Aspire.Seq --version 8.1.0
#r "nuget: Aspire.Seq, 8.1.0"
// Install Aspire.Seq as a Cake Addin #addin nuget:?package=Aspire.Seq&version=8.1.0 // Install Aspire.Seq as a Cake Tool #tool nuget:?package=Aspire.Seq&version=8.1.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
- https://docs.datalust.co/docs/the-seq-query-language
- https://github.com/dotnet/aspire/tree/main/src/Components/README.md
Feedback & contributing
Product | Versions 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. |
-
net8.0
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.9.0)
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 | 1,478 | 11/12/2024 |
9.0.0-rc.1.24511.1 | 861 | 10/15/2024 |
8.2.2 | 2,617 | 10/24/2024 |
8.2.1 | 3,155 | 9/26/2024 |
8.2.0 | 3,012 | 8/29/2024 |
8.1.0 | 7,702 | 7/23/2024 |
8.0.2 | 1,060 | 6/28/2024 |
8.0.1 | 1,137 | 5/21/2024 |
8.0.0 | 160 | 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 |