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
<PackageReference Include="Logfire.Fleet.Extensions.Hosting" Version="0.2.1" />
<PackageVersion Include="Logfire.Fleet.Extensions.Hosting" Version="0.2.1" />
<PackageReference Include="Logfire.Fleet.Extensions.Hosting" />
paket add Logfire.Fleet.Extensions.Hosting --version 0.2.1
#r "nuget: Logfire.Fleet.Extensions.Hosting, 0.2.1"
#:package Logfire.Fleet.Extensions.Hosting@0.2.1
#addin nuget:?package=Logfire.Fleet.Extensions.Hosting&version=0.2.1
#tool nuget:?package=Logfire.Fleet.Extensions.Hosting&version=0.2.1
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 | 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. 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. |
-
net10.0
- Logfire.Fleet.Client (>= 0.2.1)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 8.0.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
-
net8.0
- Logfire.Fleet.Client (>= 0.2.1)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 8.0.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.