CommunityToolkit.Aspire.Hosting.Flare 17.0.0

Prefix Reserved
dotnet add package CommunityToolkit.Aspire.Hosting.Flare --version 17.0.0
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Flare -Version 17.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="CommunityToolkit.Aspire.Hosting.Flare" Version="17.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Flare" Version="17.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Flare" />
                    
Project file
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 CommunityToolkit.Aspire.Hosting.Flare --version 17.0.0
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Flare, 17.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.
#:package CommunityToolkit.Aspire.Hosting.Flare@17.0.0
                    
#: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=CommunityToolkit.Aspire.Hosting.Flare&version=17.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Flare&version=17.0.0
                    
Install as a Cake Tool

CommunityToolkit.Aspire.Hosting.Flare library

Use this integration to model, configure, and orchestrate Flare in your Aspire AppHost. Flare is a self-hosted, OpenTelemetry-native observability backend (logs, traces, metrics and alerting) for .NET. Applications keep using the standard OpenTelemetry SDK and send plain OTLP to it.

Flare is not a replacement for the Aspire dashboard. Use it where the dashboard stops: telemetry that persists across runs, alert rules (Slack, webhook, email, PagerDuty and more), and the same backend carried through aspire publish.

Getting started

Install the package

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

dotnet add package CommunityToolkit.Aspire.Hosting.Flare

Or add it with the Aspire CLI:

aspire add CommunityToolkit.Aspire.Hosting.Flare

Usage example

Then, in the AppHost.cs file of your AppHost, add Flare on top of a ClickHouse server and a Redis instance, and point your projects at it:

var clickhouse = builder.AddClickHouse("clickhouse");
var redis = builder.AddRedis("redis");

var flare = builder.AddFlare("flare", clickhouse, redis)
                   .WithDataVolume();

builder.AddProject<Projects.Api>("api")
       .WithOtlpExporter(flare)
       .WaitFor(flare);

AddFlare runs four containers: the OTLP ingest service (the flare resource itself, on the conventional ports 4317 for gRPC and 4318 for HTTP), the query API, the alert worker and the dashboard. ClickHouse (log, trace and metric storage) and Redis (a buffer in front of ClickHouse) are passed in rather than created internally, so they show up in the app model and can be shared or configured, for example with WithDataVolume. Flare creates its own database in the ClickHouse server and migrates its own schema on startup.

WithOtlpExporter(flare) sets OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_PROTOCOL on the consuming resource. It exports over OTLP/gRPC by default; pass an OtlpProtocol, for example WithOtlpExporter(flare, OtlpProtocol.HttpProtobuf), to use OTLP/HTTP with protobuf or JSON (OtlpProtocol.HttpJson) instead. WithReference(flare) is also supported and injects the OTLP/gRPC URL as a connection string.

A resource wired with WithOtlpExporter(flare) sends its telemetry to Flare instead of the Aspire dashboard, so its logs, traces and metrics no longer appear in the dashboard's telemetry views (the resource itself, its console output and its state still do). To see the same telemetry in both, export to an OpenTelemetry Collector that forwards to each. WithOtlpExporter also removes the Aspire dashboard's OTLP API key from OTEL_EXPORTER_OTLP_HEADERS, so that key is not sent to Flare, and adds Authorization=Bearer <key> when Flare has an API key (see WithApiKey).

Persistence

ClickHouse and Redis keep their data in the volumes you configure on those resources. WithDataVolume() persists Flare's own identity database (dashboard users, sessions and ingest API keys) in a volume shared by the ingest service and the query API. Without it, both keep a private database that is lost when their containers are recreated.

Other options

Method Purpose
WithIngestPorts(grpcPort, httpPort) Change the host ports of the OTLP endpoints.
WithApiKey(parameter) Require an API key on the ingest service. OTLP clients send it as Authorization: Bearer <key> (for example OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <key>); resources wired with WithOtlpExporter(flare) send it automatically.
WithPublicUrls(apiUrl, dashboardUrl) Set the URLs a browser uses once the stack is published and no longer reachable on localhost. dashboardUrl is also the API's allowed CORS origin, so pass an origin only (https://flare.example.com, no path or trailing slash).
WithFlareImageTag(tag) Change the image tag of all four containers.

Connection Properties

When you reference the Flare resource using WithReference, the following connection properties are made available to the consuming project:

Property Name Description
Host The host of the OTLP/gRPC endpoint
Port The port of the OTLP/gRPC endpoint
Uri The OTLP/gRPC URL, for example http://localhost:4317

The connection properties are exposed as environment variables named [RESOURCE]_[PROPERTY], for example FLARE_URI.

Additional Information

https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-flare

Feedback & contributing

https://github.com/CommunityToolkit/Aspire

Product 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.  net11.0 is compatible. 
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
17.0.0 95 11/20/2026
17.0.0-beta.1090 57 11/20/2026
17.0.0-beta.1088 55 11/20/2026
17.0.0-beta.1080 93 11/20/2026