Logfire.Fleet.Extensions.Hosting 0.2.1

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

Logfire.Fleet.Extensions.Hosting

WithOpAmp(): an OpenTelemetry .NET SDK set up in code (services.AddOpenTelemetry()), managed by an OpAMP server. For automatic instrumentation, see Logfire.Fleet.AutoInstrumentation.

Quickstart

Add the package:

dotnet add package Logfire.Fleet.Extensions.Hosting

Add WithOpAmp() last to the SDK's setup:

builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddAspNetCoreInstrumentation().AddOtlpExporter())
    .WithOpAmp();

Then run the application with the server's address and key (or set OpAmp:Endpoint and OpAmp:Headers:Authorization in its configuration):

OTEL_SERVICE_NAME=checkout \
OTEL_OPAMP_ENDPOINT=https://opamp.example.com/v1/opamp \
OTEL_OPAMP_HEADERS="Authorization=Bearer%20<key>" \
dotnet Checkout.dll

When it works, the application's logger says, at Information:

OpAMP: connected to https://opamp.example.com/v1/opamp; this SDK is managed as checkout, instance <uid>

In Logfire, Fleet → Connect an application gives the endpoint and the key. When it can't connect, it warns once, with what to check.

The server can also send the application settings of its own (a feature flag, say), which it reads with Logfire.Fleet.OpAmpAppSettings.Get("checkout.new_flow", "off") and can be told of with OpAmpAppSettings.OnChange (the application's own settings).

The instance keeps its UID across restarts with no configuration (default-state-dir.md).

Everything else is in docs/dotnet-otel.md.

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
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
0.2.1 77 11/6/2026
0.2.0 80 11/5/2026