Qyl.Telemetry.Hosting 28.2.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Qyl.Telemetry.Hosting --version 28.2.3
                    
NuGet\Install-Package Qyl.Telemetry.Hosting -Version 28.2.3
                    
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="Qyl.Telemetry.Hosting" Version="28.2.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Qyl.Telemetry.Hosting" Version="28.2.3" />
                    
Directory.Packages.props
<PackageReference Include="Qyl.Telemetry.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 Qyl.Telemetry.Hosting --version 28.2.3
                    
#r "nuget: Qyl.Telemetry.Hosting, 28.2.3"
                    
#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 Qyl.Telemetry.Hosting@28.2.3
                    
#: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=Qyl.Telemetry.Hosting&version=28.2.3
                    
Install as a Cake Addin
#tool nuget:?package=Qyl.Telemetry.Hosting&version=28.2.3
                    
Install as a Cake Tool

Qyl.Telemetry.Hosting

One-line telemetry for a .NET 10 application, NativeAOT included. builder.AddQyl() wires the OpenTelemetry SDK, activates qyl's automatic instrumentation, registers the activity sources and meters, and exports traces, metrics and logs over OTLP.

dotnet add package Qyl.Telemetry.Hosting
using Qyl;

builder.AddQyl();

That is the whole integration. There is no per-library enable step: every supported source is on unless its OTEL_DOTNET_AUTO_<ID>_INSTRUMENTATION_ENABLED toggle turns it off.

The package also carries SKILL.md, the guide for a coding agent working in the application: what AddQyl() already records, the generated span starters (Spans.Work, Spans.DbClient, ...), native typed attributes for business keys, RecordFailure, and the three things the compiler cannot check.

Your own spans

Use Qyl.Spans for the generated application scope, or register an application-owned ActivitySource with options.AdditionalSources.Add(sourceName):

using var span = Spans.Work("checkout");
span?.SetTag("checkout.order.id", orderId);
try
{
    await checkout.RunAsync(order);
}
catch (Exception exception)
{
    span?.RecordFailure(exception);
    throw;
}

Where the telemetry goes

AddQyl() exports to the first of these that is set:

  1. OTEL_EXPORTER_OTLP_ENDPOINT — the standard variable, which also redirects every other OTLP exporter in the process.
  2. QYL_ENDPOINT — an HTTP/protobuf collector for the qyl exporters alone. For gRPC, use the standard OTLP endpoint/protocol variables or set both CollectorEndpoint and CollectorProtocol.
  3. A qyl collector discovered on localhost or the host qyl at 4318/4317, which is what qyl up from the qyl dotnet tool provides.

To see spans without any collector, add OpenTelemetry's console exporter through the tracing hook:

dotnet add package OpenTelemetry.Exporter.Console
builder.AddQyl(o => o.ConfigureTracing = t => t.AddConsoleExporter());

Options

AddQyl(o => ...) takes a QylTelemetryOptions. Every option has a zero-config default.

Option Default Effect
ServiceName OTEL_SERVICE_NAME, else the host application name The service.name resource attribute.
ServiceVersion the build's own version The service.version resource attribute. By default the consuming build's InformationalVersion with its source revision (1.4.0+3f2a9c1), compiled into the application by the package's generator.
ServiceNamespace unset The service.namespace resource attribute: the system this service belongs to.
DeploymentEnvironment the host environment The deployment.environment.name resource attribute, by default IHostEnvironment.EnvironmentName.
ConfigureTracing unset A hook for tracing setup the typed options do not cover. It runs after the qyl sources and processors and before the OTLP exporter.
CollectorEndpoint unset An explicit collector endpoint, ahead of the order above.
CollectorProtocol HttpProtobuf Transport for an explicit CollectorEndpoint. Set OtlpExportProtocol.Grpc for gRPC on any port. Standard OTLP environment endpoints use the SDK's protocol configuration.
EnableCollectorDiscovery true Probe localhost and the host qyl for a collector when no endpoint is set.
RequireConfiguredEndpoint false Export only when an endpoint is set or discovered, instead of falling back to the exporter's localhost default. A process that is itself a telemetry destination, such as a collector, sets it to true.
EnableLogExport true Export application logs over OTLP.
EnableMetricsExport true Register and export the qyl meter inventory and the GenAI meters.
EnableSessionTagInheritance true Copy session.id from the nearest in-process ancestor span onto spans that lack it. It sets a span tag only; nothing goes on the wire to the next process. The server span of an ASP.NET Core request carries the session.id of the request's W3C baggage either way.
AdditionalSources empty More ActivitySource names to subscribe.
AdditionalMeters empty More Meter names to subscribe.

What it pulls in

This package depends on Qyl.Telemetry.AutoInstrumentation (the instrumentation runtime) and Qyl.Telemetry.AutoInstrumentation.Hosting (the listener bootstrap). An application that wires the OpenTelemetry SDK itself should reference Qyl.Telemetry.AutoInstrumentation.Hosting directly and register the Qyl.Telemetry.AutoInstrumentation source by hand, instead of this package.

Publishing with -p:PublishAot=true produces no trim, AOT or analyzer warning from this package.

More

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. 
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
28.2.4 0 10/22/2026
28.2.3 278 10/19/2026
28.2.2 84 10/19/2026
28.2.1 88 10/19/2026
28.2.0 115 10/17/2026
28.1.1 96 10/17/2026
28.1.0 88 10/17/2026
28.0.0 87 10/17/2026
27.0.0 103 10/17/2026
26.0.0 102 10/16/2026
25.1.0 99 10/15/2026
25.0.3 83 10/15/2026
25.0.2 93 10/15/2026
25.0.1 91 10/14/2026
25.0.0 105 10/14/2026
24.1.1 81 10/14/2026
24.1.0 132 10/14/2026
24.0.2 83 10/14/2026
24.0.1 126 10/11/2026
24.0.0 375 10/11/2026
Loading failed