Qyl.OpenTelemetry.AutoInstrumentation.SqlClient 5.0.0

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

Qyl.OpenTelemetry.AutoInstrumentation

Managed automatic instrumentation for .NET 10 applications, including NativeAOT consumers. The package uses compiler-generated Roslyn interceptors, build assets, BCL telemetry primitives, public diagnostic hooks, and module-initializer bootstrap. It does not use a CLR profiler, startup hooks, ReJIT, runtime IL rewriting, or dynamic plugin loading.

Roslyn interceptors are a stable .NET SDK feature from 9.0.2xx onward; this repository builds with SDK 10.0.301. See the official interceptors.md contract.

Packages

Package Responsibility
Qyl.OpenTelemetry.AutoInstrumentation Core runtime, compiler-facing ABI, build assets, and source generator
.Hosting Generic DI and process bootstrap
.DiagnosticListeners Framework/library diagnostic event consumption
.EntityFrameworkCore EF Core integration
.SqlClient Microsoft.Data.SqlClient integration

Add the package that owns the integration you need. The supported zero-configuration consumer path is a PackageReference; build and analyzer assets flow through NuGet.

dotnet add package Qyl.OpenTelemetry.AutoInstrumentation.Hosting

How it works

  1. The source generator discovers supported source-visible calls and emits ordinary C# methods annotated with [InterceptsLocation].
  2. build and buildTransitive assets include the compiler-facing generator and enable the generated namespace in consumers.
  3. Runtime helpers and diagnostic listeners emit bounded Activity and Meter telemetry using the referenced semantic-convention vocabulary.
  4. Package-specific bootstrap activates the applicable listeners once per process.

Where a framework exposes a first-class DI or runtime hook, the package uses that hook. Interception is reserved for source-visible calls that require compile-time ownership.

Coverage and evidence

The generated coverage matrix is the detailed contract view. Its current 60 rows comprise:

  • 33 implemented signal rows: 30 with NativeAOT runtime evidence and 3 with managed runtime evidence;
  • 19 configuration rows: 12 option bindings and 7 control bindings;
  • 8 unsupported NativeAOT rows, including four CLR-profiler/.NET Framework-only options.

Those categories are intentionally separate. A configuration binding is not runtime instrumentation, and the matrix is generated from the declared contract rather than being independent empirical proof. Runtime claims are backed by executable demos or consumers named in the underlying ownership contract.

The NativeAOT boundary applies to this compile-time/managed substrate. It does not claim parity with the CLR-profiler OpenTelemetry .NET automatic instrumentor, and it does not imply that every third-party library itself publishes warning-free under NativeAOT.

Limitations

  • Only source-visible call sites can be intercepted. Calls hidden in compiled dependencies, reflection, or dynamic dispatch need a public runtime hook or remain unsupported.
  • Some integrations are managed-only because the instrumented library requires runtime code generation.
  • Query text and other sensitive or high-cardinality values remain opt-in or redacted according to the package options and upstream OpenTelemetry controls.
  • Generator snapshots prove emitted source shape; protocol interoperability requires a real OTLP receiver and structural decoding of official protobuf messages.

Verify

Run the complete local gate:

python3 tools/verify-aot-autoinstrumentation-goal.py

That gate builds the package and demo solutions, validates generated artifacts and public API baselines, and executes managed/NativeAOT consumer evidence.

License

Apache-2.0

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
5.0.0 0 7/13/2026
4.1.0 0 7/13/2026
4.0.3 91 7/1/2026
4.0.2 98 7/1/2026
4.0.1 93 7/1/2026
4.0.0 89 7/1/2026
3.1.2 104 6/30/2026
3.1.1 104 6/30/2026
3.1.0 95 6/29/2026
3.0.2 106 6/25/2026