Skip to content

Converge auto-instrumentation for 8.0 - #38

Merged
ANcpLua merged 3 commits into
mainfrom
codex/8.0-feasibility-convergence
Jul 19, 2026
Merged

Converge auto-instrumentation for 8.0#38
ANcpLua merged 3 commits into
mainfrom
codex/8.0-feasibility-convergence

Conversation

@ANcpLua

@ANcpLua ANcpLua commented Jul 19, 2026

Copy link
Copy Markdown
Owner

What changed

  • Bump the package family to 8.0.0 and generated-code ABI to V8.
  • Converge telemetry ownership by deleting obsolete interceptor lanes, duplicate metrics, unsupported options, wrappers, and synthetic fallback implementations.
  • Add real integration evidence for Azure SDK, Microsoft.Extensions.AI, Microsoft Agents, MCP, CoreWCF, EF Core, and SqlClient.
  • Generate the 66-row coverage contract and exhaustive source-interceptor manifest, with stronger invariant and packaged-consumer verification.

Why

This completes the feasibility run by turning its verified outcomes into one coherent breaking release design. Each supported capability now has an executable owner and evidence, while impossible or redundant designs are removed instead of preserved behind compatibility layers.

Impact

This is intentionally breaking. Consumers must use the 8.0 package set and V8 generated-code ABI. Removed options and helper surfaces have no compatibility shims.

Validation

  • env DOTNET_CLI_USE_MSBUILD_SERVER=0 python3 tools/verify-aot-autoinstrumentation-goal.py
  • Complete gate exited 0 with aot-autoinstrumentation-goal-ok.
  • All 25 NativeAOT publish-matrix cases passed.
  • Managed and NativeAOT consumers, runtime demos, OTLP receiver evidence, API baselines, generated snapshots, and diff checks passed.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Released version 8.0.0 with Qyl.Sdk as the recommended zero-configuration onboarding path.
    • Added supported telemetry coverage for GenAI, MCP, and CoreWCF integrations.
    • Added new CoreWCF, GenAI, and MCP demonstration applications.
    • Generated interceptors now include machine-readable metadata manifests.
  • Improvements

    • Improved Azure telemetry enrichment and database activity timing.
    • Refined ASP.NET Core middleware ownership to prevent duplicate server spans.
    • Updated error telemetry to report fully qualified exception types.
  • Documentation

    • Expanded onboarding, integration coverage, support boundaries, and NativeAOT guidance.

Walkthrough

This release updates the repository to version 8.0.0, narrows generated and public instrumentation surfaces, adds version-pinned AI/MCP/CoreWCF contracts and demos, changes telemetry ownership and timing, and expands generator, package, managed, and NativeAOT verification.

Changes

8.0 architecture and release

Layer / File(s) Summary
Release metadata and repository contracts
AGENTS.md, CHANGELOG.md, Directory.*, Qyl.OpenTelemetry.AutoInstrumentation.Demos.slnx
Version 8.0 metadata, dependency versions, ABI guidance, changelog entries, and solution project coverage are updated.
SDK onboarding and telemetry registration
README.md, src/Qyl.Sdk/*
Qyl.Sdk becomes the onboarding path, with centralized source/meter selection and Azure span processing.

Runtime instrumentation changes

Layer / File(s) Summary
Runtime ownership and public surface
src/Qyl.OpenTelemetry.AutoInstrumentation/*, src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/*
ASP.NET Core middleware ownership and generated bootstrap wiring are revised while obsolete public interceptor and metric exports are removed.
Activity timing and listener bridges
src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/*, src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/*, src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
DiagnosticListener activities can use explicit operation start times, SQL Client tracks operation starts, and duplicate database activities are suppressed.
Capture and metric-surface reduction
src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/*, src/Qyl.OpenTelemetry.AutoInstrumentation/QylIntercepted*.cs
Obsolete header, duration, and HTTP metric paths are removed or narrowed; database and NServiceBus metric helpers use specialized implementations.

Generator and contract model

Layer / File(s) Summary
Generator descriptors and ABI manifests
src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/*, tests/.../verified/*
Interceptor targets are narrowed, generated code uses ABI V8, and emitted invocations carry JSON manifest metadata.
Native contract and coverage artifacts
docs/contracts/*, docs/coverage-matrix.md, tools/generate-contract-artifacts.py
Six qyl-native contract items and MCP conformance signals are added, with origin-aware schemas and regenerated coverage data.

Demos and verification

Layer / File(s) Summary
GenAI, MCP, and CoreWCF demonstrations
demos/Qyl.RealGenAiDemo/*, demos/Qyl.RealMcpDemo/*, demos/Qyl.RealCoreWcfDemo/*
New deterministic demos capture and validate traces, metrics, parentage, session IDs, registration state, and sensitive-value absence.
Demo telemetry assertions
demos/Qyl.Real*Demo/Program.cs
Demo-local meter names, SQL trace-owner modes, Azure span counts, and fully qualified error-type expectations are updated.
Manifest, package, and gate verification
tools/*, benchmarks/*
Manifest coverage, package smoke tests, contract invariants, ABI synchronization, and managed/NativeAOT demo gates are expanded or revised.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Demo
  participant QylSdk as QylSdk.AddQyl
  participant OpenTelemetry
  participant ActivitySource
  Demo->>QylSdk: configure enabled sources and meters
  QylSdk->>OpenTelemetry: register sources, meters, and Azure processor
  Demo->>ActivitySource: execute instrumented operation
  ActivitySource->>OpenTelemetry: export activity and normalized tags
  OpenTelemetry-->>Demo: provide captured telemetry for report validation
Loading

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/8.0-feasibility-convergence
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/8.0-feasibility-convergence

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs`:
- Around line 25-37: The HttpRequestIn.Start branch in the ASP.NET Core
diagnostic listener forces sampling even when middleware owns instrumentation.
Gate the ActivityTraceFlags.Recorded assignment on
!QylAspNetCoreOwnership.MiddlewareRegistered, or remove that flag update from
this listener, while preserving the existing event handling and return flow.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs`:
- Around line 39-41: Add an immediate null check after
QylActivitySource.StartAtAmbientStart in the diagnostic listener, returning
before tag evaluation or DatabaseSemantics.ShouldWriteQueryText when no Activity
is created. Preserve the existing instrumentation flow for observed activities.

In `@src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs`:
- Around line 91-99: Thread the already-normalized method from
StartRequestActivity through InvokeAsync and ObserveAsync into RecordResponse,
then pass it to BackfillServerRoute. Remove the per-response
QylHttpMethod.Normalize call in RecordResponse while preserving the existing
response status and header handling.

In `@src/Qyl.Sdk/QylAzureSpanProcessor.cs`:
- Around line 27-39: Update FindExceptionType to traverse events with
activity.EnumerateEvents() instead of activity.Events, avoiding heap enumerator
allocation, and only enumerate an event’s tags when it is an exception event;
preserve returning the exception.type string when present and null otherwise.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5f2b841b-3ac4-4568-9bde-97eeb3b87f8d

📥 Commits

Reviewing files that changed from the base of the PR and between 37ad57a and 0a9af3f.

⛔ Files ignored due to path filters (4)
  • docs/generated/qyl-aot-contract.resolved.yaml is excluded by !**/generated/**, !**/Generated/**, !**/generated/**
  • docs/generated/qyl-aot-contract.schema.json is excluded by !**/generated/**, !**/Generated/**, !**/generated/**
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/buildTransitive/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore.Bootstrap.g.cs is excluded by !**/*.g.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/buildTransitive/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.Bootstrap.g.cs is excluded by !**/*.g.cs
📒 Files selected for processing (114)
  • AGENTS.md
  • CHANGELOG.md
  • Directory.Build.props
  • Directory.Packages.props
  • Qyl.OpenTelemetry.AutoInstrumentation.Demos.slnx
  • README.md
  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
  • demos/Qyl.RealAspNetCoreMetricsDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Qyl.RealAzureDemo.csproj
  • demos/Qyl.RealCoreWcfDemo/Program.cs
  • demos/Qyl.RealCoreWcfDemo/Qyl.RealCoreWcfDemo.csproj
  • demos/Qyl.RealGenAiDemo/Program.cs
  • demos/Qyl.RealGenAiDemo/Qyl.RealGenAiDemo.csproj
  • demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • demos/Qyl.RealGrpcClientDemo/Qyl.RealGrpcClientDemo.csproj
  • demos/Qyl.RealHttpClientDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Qyl.RealMcpDemo.csproj
  • demos/Qyl.RealNServiceBusDemo/Program.cs
  • demos/Qyl.RealNetRuntimeMetricsDemo/Program.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Qyl.RealSqlClientDemo.csproj
  • docs/contracts/qyl-aot-ownership.yaml
  • docs/contracts/qyl-native-instrumentations.yaml
  • docs/coverage-matrix.md
  • docs/qyl-aot-autoinstrumentation.conformance-plan.json
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/ModuleInitializerBoot.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/PublicAPI.Unshipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/Qyl.OpenTelemetry.AutoInstrumentation.Hosting.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDurationMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Qyl.OpenTelemetry.AutoInstrumentation.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivityNames.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylHttpClientMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentationDomains.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedAspNetCore.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedAzure.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedEntityFrameworkCore.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedGrpcNetClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpWebRequest.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfCore.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricNames.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylNServiceBusMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylRuntimeProcessMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSignalOwnership.cs
  • src/Qyl.Sdk/Qyl.Sdk.csproj
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/verified/report.json
  • tools/generate-contract-artifacts.py
  • tools/generator_manifest_coverage.py
  • tools/smoketest.sh
  • tools/verify-aot-autoinstrumentation-goal.py
  • tools/verify-aot-publish-gate.py
  • tools/verify-aspnetcore-middleware-delegate.py
  • tools/verify-contract-coverage-report.py
  • tools/verify-contract-invariants.py
  • tools/verify-environment-options-behavior.py
  • tools/verify-generator-snapshots.py
  • tools/verify-instrumentation-disabled-behavior.py
  • tools/verify-otlp-receiver.py
  • tools/verify-real-aspnetcore-demo.py
  • tools/verify-real-azure-demo.py
  • tools/verify-real-corewcf-demo.py
  • tools/verify-real-genai-demo.py
  • tools/verify-real-grpc-client-demo.py
  • tools/verify-real-mcp-demo.py
  • tools/verify-real-sqlclient-demo.py
  • tools/verify-source-interceptor-consumer.py
  • tools/verify-version-sync.py
💤 Files with no reviewable changes (28)
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedAzure.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylNServiceBusMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfCore.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/ModuleInitializerBoot.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylRuntimeProcessMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/PublicAPI.Unshipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedAspNetCore.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylHttpClientMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedEntityFrameworkCore.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs
  • demos/Qyl.RealGrpcClientDemo/Qyl.RealGrpcClientDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedGrpcNetClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricNames.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Qyl.OpenTelemetry.AutoInstrumentation.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpWebRequest.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDurationMetrics.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSignalOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivityNames.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • tools/verify-real-grpc-client-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentationDomains.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: verify (macos-latest)
  • GitHub Check: verify (ubuntu-24.04-arm)
  • GitHub Check: webapi-aot-demo (ubuntu-24.04-arm)
🧰 Additional context used
📓 Path-based instructions (21)
**/*.{cs,csproj,props,targets}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{cs,csproj,props,targets}: Preserve the supported public API surface and keep internal implementation types internal; use IVT for cross-assembly access rather than widening types to public.
Use SemanticModel.GetInterceptableLocation(...) and ordinary generated C# for Roslyn interception; do not use CLR profilers, startup hooks, ReJIT, runtime IL rewriting, dynamic plugin loading, or reflection-based instrumentation dispatch.
Prefer a first-class runtime or DI hook when it owns the behavior; intercept source-visible calls only when required, and never let two generators own the same call site.
Use official OTLP protobuf types and a real loopback receiver for runtime and protocol evidence; do not use hand-shaped OTLP JSON, fabricated identifiers or timestamps, protobuf substring searches, or echoing mocks as interoperability proof.
Keep Core limited to shared runtime and compiler-facing ABI; keep Hosting generic bootstrap/DI, DiagnosticListeners diagnostic-payload consumption, Qyl.Sdk onboarding/export concerns without interceptors, and dependency-heavy integrations isolated in their respective packages.
Synthetic verifier consumers must compile against the public surface only; fix consumers when types become internal, and grant narrowly named IVT access only to probers that genuinely require internals.
Update analyzer-managed shipped/unshipped API baselines for public API changes.

Files:

  • Directory.Build.props
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/Qyl.OpenTelemetry.AutoInstrumentation.Hosting.csproj
  • src/Qyl.Sdk/Qyl.Sdk.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • demos/Qyl.RealCoreWcfDemo/Qyl.RealCoreWcfDemo.csproj
  • demos/Qyl.RealGenAiDemo/Qyl.RealGenAiDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • demos/Qyl.RealMcpDemo/Qyl.RealMcpDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • Directory.Packages.props
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • demos/Qyl.RealNetRuntimeMetricsDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Qyl.RealSqlClientDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • demos/Qyl.RealAzureDemo/Qyl.RealAzureDemo.csproj
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • demos/Qyl.RealNServiceBusDemo/Program.cs
  • demos/Qyl.RealCoreWcfDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • demos/Qyl.RealHttpClientDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Program.cs
  • demos/Qyl.RealAspNetCoreMetricsDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • demos/Qyl.RealGenAiDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
**/*.{cs,csproj,props,targets,yml,yaml,py}

📄 CodeRabbit inference engine (AGENTS.md)

Every capability must have an executable owner, such as a product call path, owned consumer, or conformance application exercising the complete contract.

Files:

  • Directory.Build.props
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/Qyl.OpenTelemetry.AutoInstrumentation.Hosting.csproj
  • src/Qyl.Sdk/Qyl.Sdk.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • demos/Qyl.RealCoreWcfDemo/Qyl.RealCoreWcfDemo.csproj
  • demos/Qyl.RealGenAiDemo/Qyl.RealGenAiDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • demos/Qyl.RealMcpDemo/Qyl.RealMcpDemo.csproj
  • tools/verify-real-genai-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • tools/verify-aot-publish-gate.py
  • tools/verify-real-azure-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • tools/verify-contract-coverage-report.py
  • Directory.Packages.props
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • tools/verify-aot-autoinstrumentation-goal.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • demos/Qyl.RealNetRuntimeMetricsDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Qyl.RealSqlClientDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • tools/verify-aspnetcore-middleware-delegate.py
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • demos/Qyl.RealAzureDemo/Qyl.RealAzureDemo.csproj
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • tools/verify-real-corewcf-demo.py
  • docs/contracts/qyl-native-instrumentations.yaml
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • tools/verify-otlp-receiver.py
  • demos/Qyl.RealNServiceBusDemo/Program.cs
  • demos/Qyl.RealCoreWcfDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • demos/Qyl.RealHttpClientDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Program.cs
  • tools/verify-generator-snapshots.py
  • demos/Qyl.RealAspNetCoreMetricsDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Program.cs
  • tools/verify-real-aspnetcore-demo.py
  • tools/verify-version-sync.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • tools/verify-real-mcp-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • tools/verify-source-interceptor-consumer.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • tools/verify-instrumentation-disabled-behavior.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • demos/Qyl.RealGenAiDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • docs/contracts/qyl-aot-ownership.yaml
  • tools/generator_manifest_coverage.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • tools/verify-real-sqlclient-demo.py
  • tools/verify-environment-options-behavior.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • tools/generate-contract-artifacts.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • tools/verify-contract-invariants.py
**

⚙️ CodeRabbit configuration file

**: Operating principles (solo-dev, agentic SDLC — reviews are advisory, agents act on them):

  1. LAZY: one self-contained, correct review beats ten partial ones. Every finding is
    definitive — concrete evidence with file:line, a concrete fix, no "consider maybe",
    no open or ambiguous questions back to the author. If you cannot decide a point
    from the diff plus repo context, stay silent on it. Never cite a source, API, or
    version you have not verified; an unverifiable claim is a dropped claim.
  2. IMPATIENT: never stall a PR. Internal and dogfooding-only surfaces converge directly;
    removing shims, breaking internal signatures, and deleting dead paths are normal.
    Published NuGet APIs follow SemVer: breaking changes require a deliberate new major
    and migration of known consumers. Do not request compatibility layers without a
    proven consumer.
  3. EGO: hold the bar of the best reviewer on the market — flag real correctness,
    security, data-loss, and structural problems precisely; produce zero noise.

Files:

  • Directory.Build.props
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/Qyl.OpenTelemetry.AutoInstrumentation.Hosting.csproj
  • src/Qyl.Sdk/Qyl.Sdk.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • demos/Qyl.RealCoreWcfDemo/Qyl.RealCoreWcfDemo.csproj
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
  • demos/Qyl.RealGenAiDemo/Qyl.RealGenAiDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • demos/Qyl.RealMcpDemo/Qyl.RealMcpDemo.csproj
  • tools/verify-real-genai-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/PublicAPI.Shipped.txt
  • tools/verify-aot-publish-gate.py
  • CHANGELOG.md
  • tools/verify-real-azure-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • tools/verify-contract-coverage-report.py
  • docs/qyl-aot-autoinstrumentation.conformance-plan.json
  • Directory.Packages.props
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • tools/verify-aot-autoinstrumentation-goal.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • AGENTS.md
  • demos/Qyl.RealNetRuntimeMetricsDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Qyl.RealSqlClientDemo.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • tools/verify-aspnetcore-middleware-delegate.py
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • demos/Qyl.RealAzureDemo/Qyl.RealAzureDemo.csproj
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • tools/verify-real-corewcf-demo.py
  • docs/contracts/qyl-native-instrumentations.yaml
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • tools/verify-otlp-receiver.py
  • demos/Qyl.RealNServiceBusDemo/Program.cs
  • demos/Qyl.RealCoreWcfDemo/Program.cs
  • docs/coverage-matrix.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • demos/Qyl.RealHttpClientDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Program.cs
  • tools/verify-generator-snapshots.py
  • demos/Qyl.RealAspNetCoreMetricsDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Program.cs
  • tools/verify-real-aspnetcore-demo.py
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/verified/report.json
  • tools/verify-version-sync.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • tools/verify-real-mcp-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • Qyl.OpenTelemetry.AutoInstrumentation.Demos.slnx
  • tools/verify-source-interceptor-consumer.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • README.md
  • tools/verify-instrumentation-disabled-behavior.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • demos/Qyl.RealGenAiDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • docs/contracts/qyl-aot-ownership.yaml
  • tools/generator_manifest_coverage.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • tools/verify-real-sqlclient-demo.py
  • tools/smoketest.sh
  • src/Qyl.OpenTelemetry.AutoInstrumentation/PublicAPI.Shipped.txt
  • tools/verify-environment-options-behavior.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • tools/generate-contract-artifacts.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • tools/verify-contract-invariants.py
src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/**

📄 CodeRabbit inference engine (CLAUDE.md)

Keep Microsoft.Data.SqlClient code isolated in Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/**

📄 CodeRabbit inference engine (CLAUDE.md)

Keep generic hosting/bootstrap code isolated in Qyl.OpenTelemetry.AutoInstrumentation.Hosting.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Hosting/Qyl.OpenTelemetry.AutoInstrumentation.Hosting.csproj
src/Qyl.OpenTelemetry.AutoInstrumentation/**/*.{cs,props,targets}

📄 CodeRabbit inference engine (CLAUDE.md)

Do not leak EFCore or SqlClient dependencies, warnings, or NativeAOT constraints into the core runtime package or Hosting package.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
**/*.cs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.cs: Keep generated interceptor methods in Qyl.OpenTelemetry.AutoInstrumentation.Generated and runtime ABI helpers in Qyl.OpenTelemetry.AutoInstrumentation.GeneratedCode; do not rename or conflate the namespaces.
Generated interceptor files must reference QylGeneratedCodeAbi.V8; breaking ABI changes must bump the V<major> anchor.
Generated code must not reference QylAutoInstrumentationOptions or QylInstrumentationDomains; gate opt-ins at the policy type and emit domain names as literals.
All members of the generated-code ABI and bootstrap ABI must use [EditorBrowsable(EditorBrowsableState.Never)].

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • demos/Qyl.RealNetRuntimeMetricsDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • demos/Qyl.RealNServiceBusDemo/Program.cs
  • demos/Qyl.RealCoreWcfDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • demos/Qyl.RealHttpClientDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Program.cs
  • demos/Qyl.RealAspNetCoreMetricsDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • demos/Qyl.RealGenAiDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
**/*.{cs,md,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

Keep missing runtime values missing, bound span names and metric dimensions, and apply the repository's explicit sensitive-value redaction and opt-in controls.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • CHANGELOG.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • AGENTS.md
  • demos/Qyl.RealNetRuntimeMetricsDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • docs/contracts/qyl-native-instrumentations.yaml
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • demos/Qyl.RealNServiceBusDemo/Program.cs
  • demos/Qyl.RealCoreWcfDemo/Program.cs
  • docs/coverage-matrix.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • demos/Qyl.RealHttpClientDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Program.cs
  • demos/Qyl.RealAspNetCoreMetricsDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • README.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • demos/Qyl.RealGenAiDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • docs/contracts/qyl-aot-ownership.yaml
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
**/*.{md,py,cs}

📄 CodeRabbit inference engine (AGENTS.md)

Before judging, planning, or implementing an external library or framework integration, verify its current package registry and upstream repository status, explicitly check for successors, and record what was checked and the date.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • tools/verify-real-genai-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • tools/verify-aot-publish-gate.py
  • CHANGELOG.md
  • tools/verify-real-azure-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • tools/verify-contract-coverage-report.py
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • tools/verify-aot-autoinstrumentation-goal.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • AGENTS.md
  • demos/Qyl.RealNetRuntimeMetricsDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • tools/verify-aspnetcore-middleware-delegate.py
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • tools/verify-real-corewcf-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • tools/verify-otlp-receiver.py
  • demos/Qyl.RealNServiceBusDemo/Program.cs
  • demos/Qyl.RealCoreWcfDemo/Program.cs
  • docs/coverage-matrix.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • demos/Qyl.RealHttpClientDemo/Program.cs
  • demos/Qyl.RealMcpDemo/Program.cs
  • tools/verify-generator-snapshots.py
  • demos/Qyl.RealAspNetCoreMetricsDemo/Program.cs
  • demos/Qyl.RealAzureDemo/Program.cs
  • tools/verify-real-aspnetcore-demo.py
  • tools/verify-version-sync.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • tools/verify-real-mcp-demo.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • tools/verify-source-interceptor-consumer.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • README.md
  • tools/verify-instrumentation-disabled-behavior.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • demos/Qyl.RealGenAiDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • tools/generator_manifest_coverage.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • tools/verify-real-sqlclient-demo.py
  • tools/verify-environment-options-behavior.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • tools/generate-contract-artifacts.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • tools/verify-contract-invariants.py
src/**/*.cs

⚙️ CodeRabbit configuration file

src/**/*.cs: Zero-code instrumentation runtime: this code runs inside EVERY request of host
applications. Top priorities, in order: (1) allocations and boxing on hot paths —
flag closures, LINQ, params arrays, string concat in listener/semantic-tag code;
(2) tag cardinality — any attribute value that is unbounded (raw URLs, user input,
exception messages) explodes at scale; (3) Activity/Meter lifecycle — undisposed
listeners, leaked subscriptions, double-Start/Stop; (4) thread safety of shared
listener state. PublicAPI.Shipped/Unshipped.txt are analyzer-managed: edits must
come from the analyzer flow. These packages are public; breaking changes require
a deliberate new major and migration of known consumers.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreOwnership.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInstrumentation.cs
  • src/Qyl.Sdk/QylAzureSpanProcessor.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreInstrumentationServiceCollectionExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedWcfClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylGeneratedCodeAbi.cs
  • src/Qyl.Sdk/QylSdkOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientAutoInstrumentationBootstrap.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedNServiceBus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCapturedNameMap.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.Sdk/QylSdkHostApplicationBuilderExtensions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedDbCommand.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationIds.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/**

📄 CodeRabbit inference engine (CLAUDE.md)

Source-generator verified snapshots are generated/evidence files and must be updated only through regeneration, not manual edits.

Files:

  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
**/verified/**

📄 CodeRabbit inference engine (CLAUDE.md)

Snapshot/OTLP verified fixture files are generated/evidence files and must not be hand-edited.

Files:

  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/verified/report.json
tests/**

⚙️ CodeRabbit configuration file

tests/**: Deterministic synchronization and assertions only. Container-backed integration
tests may use real external services; unit and snapshot tests must not depend on
ambient services. Assert observable telemetry output, not implementation internals.

Files:

  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.Interceptors.g.verified.cs
**/PublicAPI.Shipped.txt

📄 CodeRabbit inference engine (CLAUDE.md)

Public API additions and changes must be reflected in PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt baselines next to each packaged project.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation/PublicAPI.Shipped.txt
**/*.{sh,py}

📄 CodeRabbit inference engine (AGENTS.md)

Read verification gate exit codes directly; do not mask failures with tail, head, or tee without checking the underlying status or enabling pipefail.

Files:

  • tools/verify-real-genai-demo.py
  • tools/verify-aot-publish-gate.py
  • tools/verify-real-azure-demo.py
  • tools/verify-contract-coverage-report.py
  • tools/verify-aot-autoinstrumentation-goal.py
  • tools/verify-aspnetcore-middleware-delegate.py
  • tools/verify-real-corewcf-demo.py
  • tools/verify-otlp-receiver.py
  • tools/verify-generator-snapshots.py
  • tools/verify-real-aspnetcore-demo.py
  • tools/verify-version-sync.py
  • tools/verify-real-mcp-demo.py
  • tools/verify-source-interceptor-consumer.py
  • tools/verify-instrumentation-disabled-behavior.py
  • tools/generator_manifest_coverage.py
  • tools/verify-real-sqlclient-demo.py
  • tools/smoketest.sh
  • tools/verify-environment-options-behavior.py
  • tools/generate-contract-artifacts.py
  • tools/verify-contract-invariants.py
src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/**

📄 CodeRabbit inference engine (CLAUDE.md)

Keep EFCore code isolated in Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreAutoInstrumentationBootstrap.cs
CHANGELOG*

📄 CodeRabbit inference engine (CLAUDE.md)

Keep the changelog synthetic and useful for continuation, not a raw commit dump.

Files:

  • CHANGELOG.md
docs/coverage-matrix.md

📄 CodeRabbit inference engine (COVERAGE_LEDGER.md)

Keep the coverage matrix aligned with the current contract classification and implemented coverage state.

Do not manually edit the generated coverage matrix or misrepresent unsupported, configuration-only, runtime, or NativeAOT rows as universally implemented or verified.

Files:

  • docs/coverage-matrix.md
README*

📄 CodeRabbit inference engine (CLAUDE.md)

Keep the README user-facing and operational.

Files:

  • README.md
benchmarks/**

⚙️ CodeRabbit configuration file

benchmarks/**: BenchmarkDotNet projects. Flag benchmarks that measure nothing (dead code paths,
constant-folded bodies) and setup work leaking into the measured body.

Files:

  • benchmarks/Qyl.OpenTelemetry.AutoInstrumentation.Benchmarks/Program.cs
tools/generate-contract-artifacts.py

📄 CodeRabbit inference engine (AGENTS.md)

Treat the YAML ownership contract and tools/generate-contract-artifacts.py as authoritative for generated coverage and conformance artifacts; regenerate and commit outputs together with input or generator changes.

Files:

  • tools/generate-contract-artifacts.py
🪛 ast-grep (0.44.1)
tools/verify-real-genai-demo.py

[info] 61-61: use jsonify instead of json.dumps for JSON output
Context: json.dumps(report, indent=2, sort_keys=True)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)


[error] 95-103: Command coming from incoming request
Context: subprocess.run(
["dotnet", str(artifacts_bin_assembly(PROJECT))],
cwd=PROJECT.parent,
env=env,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

tools/verify-real-corewcf-demo.py

[error] 35-43: Command coming from incoming request
Context: subprocess.run(
["dotnet", str(artifacts_bin_assembly(PROJECT))],
cwd=PROJECT.parent,
env=env,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)


[info] 57-57: use jsonify instead of json.dumps for JSON output
Context: json.dumps(report, indent=2, sort_keys=True)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

tools/verify-version-sync.py

[warning] 135-135: XPath query is request-/variable-derived; use parameterized XPath to prevent injection.
Context: reference_pattern.findall(path.read_text(encoding="utf-8"))
Note: [CWE-643] Improper Neutralization of Data within XPath Expressions ('XPath Injection').

(xpath-injection-python)

tools/verify-real-mcp-demo.py

[error] 198-206: Command coming from incoming request
Context: subprocess.run(
[str(executable)],
cwd=executable.parent,
env=env,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)


[error] 226-234: Command coming from incoming request
Context: subprocess.run(
["dotnet", str(artifacts_bin_assembly(PROJECT))],
cwd=PROJECT.parent,
env=env,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)


[error] 239-247: Command coming from incoming request
Context: subprocess.run(
["dotnet", str(artifacts_bin_assembly(PROJECT))],
cwd=PROJECT.parent,
env=disabled_env,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)


[info] 94-94: use jsonify instead of json.dumps for JSON output
Context: json.dumps(report, indent=2, sort_keys=True)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

tools/generator_manifest_coverage.py

[error] 231-239: Use of unsanitized data to create processes
Context: subprocess.run(
command,
cwd=ROOT,
env=environment,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(os-system-unsanitized-data)


[info] 106-106: use jsonify instead of json.dumps for JSON output
Context: json.dumps(ordered, ensure_ascii=False, separators=(",", ":"))
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)


[error] 231-239: Command coming from incoming request
Context: subprocess.run(
command,
cwd=ROOT,
env=environment,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

tools/verify-real-sqlclient-demo.py

[info] 75-75: use jsonify instead of json.dumps for JSON output
Context: json.dumps(report, indent=2, sort_keys=True)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

Comment on lines +39 to +41
using var activity = QylActivitySource.StartAtAmbientStart(
QylActivityNames.SqlClientCommand(command.Operation),
ActivityKind.Client);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Missing null check for unobserved Activity on the hot path.

QylActivitySource.StartAtAmbientStart returns null when there are no listeners. Without an early return, the listener proceeds to evaluate tags and DatabaseSemantics.ShouldWriteQueryText, burning CPU on the hot path for unobserved telemetry. As per path instructions, preventing overhead on hot paths is a top priority.

⚡ Proposed fix
         using var activity = QylActivitySource.StartAtAmbientStart(
             QylActivityNames.SqlClientCommand(command.Operation),
             ActivityKind.Client);
+
+        if (activity is null)
+            return;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
using var activity = QylActivitySource.StartAtAmbientStart(
QylActivityNames.SqlClientCommand(command.Operation),
ActivityKind.Client);
using var activity = QylActivitySource.StartAtAmbientStart(
QylActivityNames.SqlClientCommand(command.Operation),
ActivityKind.Client);
if (activity is null)
return;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs`
around lines 39 - 41, Add an immediate null check after
QylActivitySource.StartAtAmbientStart in the diagnostic listener, returning
before tag evaluation or DatabaseSemantics.ShouldWriteQueryText when no Activity
is created. Preserve the existing instrumentation flow for observed activities.

Source: Path instructions

Comment on lines +91 to +99
private static void RecordResponse(Activity activity, HttpContext context)
{
QylHttpActivityPolicy.BackfillServerRoute(activity, QylHttpMethod.Normalize(context.Request.Method), GetRoute(context));
QylHttpActivityPolicy.SetResponseStatus(activity, context.Response.StatusCode, 500);
QylCaptureHelpers.SetRequestHeaders(
activity,
QylAutoInstrumentationOptions.Current.AspNetCoreCapturedResponseHeaderMap,
context.Response.Headers);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Redundant Normalize call on every request.

RecordResponse re-normalizes context.Request.Method (Line 93) even though StartRequestActivity already computed it (Line 52, discarding methodOriginal). Thread the already-computed value through instead of recomputing it per response on this hot path.

♻️ Proposed fix
-    private static async Task ObserveAsync(Task originalTask, HttpContext context, Activity? activity)
+    private static async Task ObserveAsync(Task originalTask, HttpContext context, Activity? activity, string method)
     {
         if (activity is null)
         {
             await originalTask.ConfigureAwait(false);
             return;
         }

         try
         {
             await originalTask.ConfigureAwait(false);
-            RecordResponse(activity, context);
+            RecordResponse(activity, context, method);
         }

(and pass method from StartRequestActivity's already-normalized value through InvokeAsyncObserveAsyncRecordResponse, removing the second Normalize call.)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Qyl.OpenTelemetry.AutoInstrumentation/QylAspNetCoreStartupFilter.cs`
around lines 91 - 99, Thread the already-normalized method from
StartRequestActivity through InvokeAsync and ObserveAsync into RecordResponse,
then pass it to BackfillServerRoute. Remove the per-response
QylHttpMethod.Normalize call in RecordResponse while preserving the existing
response status and header handling.

Comment on lines +27 to +39
private static string? FindExceptionType(Activity activity)
{
foreach (var activityEvent in activity.Events)
{
foreach (var tag in activityEvent.Tags)
{
if (StringComparer.Ordinal.Equals(tag.Key, "exception.type") && tag.Value is string exceptionType)
return exceptionType;
}
}

return null;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Optimize event traversal on the hot path.

Iterating activity.Events allocates an IEnumerator on the heap for every ended Azure error span. Additionally, scanning tags for every event allocates an enumerator per event. Use activity.EnumerateEvents() to traverse events without allocation, and skip the tag enumeration for non-exception events to eliminate unnecessary allocations.

⚡ Proposed fix
-    private static string? FindExceptionType(Activity activity)
-    {
-        foreach (var activityEvent in activity.Events)
-        {
-            foreach (var tag in activityEvent.Tags)
-            {
-                if (StringComparer.Ordinal.Equals(tag.Key, "exception.type") && tag.Value is string exceptionType)
-                    return exceptionType;
-            }
-        }
-
-        return null;
-    }
+    private static string? FindExceptionType(Activity activity)
+    {
+        foreach (var activityEvent in activity.EnumerateEvents())
+        {
+            if (activityEvent.Name != "exception")
+                continue;
+
+            foreach (var tag in activityEvent.Tags)
+            {
+                if (StringComparer.Ordinal.Equals(tag.Key, "exception.type") && tag.Value is string exceptionType)
+                    return exceptionType;
+            }
+        }
+
+        return null;
+    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private static string? FindExceptionType(Activity activity)
{
foreach (var activityEvent in activity.Events)
{
foreach (var tag in activityEvent.Tags)
{
if (StringComparer.Ordinal.Equals(tag.Key, "exception.type") && tag.Value is string exceptionType)
return exceptionType;
}
}
return null;
}
private static string? FindExceptionType(Activity activity)
{
foreach (var activityEvent in activity.EnumerateEvents())
{
if (activityEvent.Name != "exception")
continue;
foreach (var tag in activityEvent.Tags)
{
if (StringComparer.Ordinal.Equals(tag.Key, "exception.type") && tag.Value is string exceptionType)
return exceptionType;
}
}
return null;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Qyl.Sdk/QylAzureSpanProcessor.cs` around lines 27 - 39, Update
FindExceptionType to traverse events with activity.EnumerateEvents() instead of
activity.Events, avoiding heap enumerator allocation, and only enumerate an
event’s tags when it is an exception event; preserve returning the
exception.type string when present and null otherwise.

Source: Path instructions

@ANcpLua
ANcpLua marked this pull request as ready for review July 19, 2026 07:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a9af3f426

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +27 to +29
var ambient = Activity.Current;
if (ambient is not null)
ambient.ActivityTraceFlags |= ActivityTraceFlags.Recorded;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid forcing the ambient ASP.NET sampled bit

When the Hosting listener sees Microsoft.AspNetCore.Hosting.HttpRequestIn.Start, this mutates the framework-owned Activity.Current by setting ActivityTraceFlags.Recorded. For requests that arrive with an unsampled traceparent or where the app's own sampler would drop the ASP.NET Core span, this flips the sampled flag for the rest of the request and can make downstream propagation/parent-based samplers record child spans the application intended to suppress. The qyl span should be enabled without changing the ambient ASP.NET Core activity's trace flags.

Useful? React with 👍 / 👎.

…ixed

Lands the 8.0 convergence (PRs #38/#39 content) plus the fixes from the
adversarially verified 30-agent review — as one release state, not a
delete-then-restore history:

- EF Core + SqlClient listener spans carry the operation's REAL timing
  (CommandEndEventData StartTime/Duration; SqlClient Before/After
  OperationId timestamp pairing) instead of inheriting the enclosing
  request's start time.
- AspNetCore listener no longer forces ActivityTraceFlags.Recorded;
  sampler decisions and upstream traceparent are honored. Root sampling
  works because Qyl.Sdk registers the Microsoft.AspNetCore and
  System.Net.Http ActivitySources (options-gated).
- HttpClient + gRPC client interceptor lanes restored as call-site owners:
  header/metadata capture with redaction, signal-ownership deferral for
  the completion listeners, core-package consumers keep HTTP/gRPC
  emission. Capture proven again by the environment-options gate and the
  dual-lane gRPC demo (managed + NativeAOT).
- DB dedupe via ConditionalWeakTable in-flight registry — exactly-once
  without pinning DbCommand graphs on exported activities.
- error.type is the fully-qualified exception type on every qyl-authored
  lane (Azure keeps its first-party source's native value); all demo
  assertions updated.
- Meter truth: MCP metrics + native Npgsql/NServiceBus meters are
  consumer-registered per the qyl-native contract; CHANGELOG states the
  ownership plainly.

Full local handoff gate green end-to-end (verify-aot-autoinstrumentation-goal).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs (1)

133-136: 🚀 Performance & Scalability | 🔴 Critical | ⚡ Quick win

Eliminate LINQ on the listener hot path to avoid struct boxing and iterator allocations.

Calling Where and Select on StringValues boxes the struct into IEnumerable<string> and allocates multiple iterators per header capture. As per path instructions, avoid LINQ and boxing allocations in listener/semantic-tag code.

⚡ Proposed fix using a manual loop
-    private static string[] ToTagValues(StringValues values)
-        => values.Count is 0
-            ? []
-            : values.Where(static value => value is not null).Select(static value => value!).ToArray();
+    private static string[] ToTagValues(StringValues values)
+    {
+        if (values.Count == 0)
+            return [];
+
+        var result = new List<string>(values.Count);
+        for (var i = 0; i < values.Count; i++)
+        {
+            var value = values[i];
+            if (value is not null)
+                result.Add(value);
+        }
+
+        return result.ToArray();
+    }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs`
around lines 133 - 136, Replace the LINQ-based Where/Select pipeline in
ToTagValues with an allocation-free manual loop over StringValues, filtering
null entries and populating the returned string array directly. Preserve the
empty result for values.Count == 0 and avoid boxing, iterator creation, and
other LINQ allocations on this hot path.

Source: Path instructions

src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs (2)

39-44: 🚀 Performance & Scalability | 🔴 Critical | ⚡ Quick win

String allocations on the hot path.

GetGrpcServiceName performs substring allocations (clientTypeName[(lastDot + 1)..] and service[..^6]) every time an RPC activity starts. Cache the resolved service name per clientTypeName to eliminate these allocations on the hot path. As per path instructions, preventing allocations on hot paths is a top priority.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs`
around lines 39 - 44, Update GetGrpcServiceName to cache the resolved service
name keyed by clientTypeName, returning the cached value on repeated calls and
computing it only on a cache miss. Preserve the existing namespace stripping and
trailing “Client” removal behavior while ensuring the RPC activity hot path
avoids repeated substring allocations.

Source: Path instructions


39-44: 🚀 Performance & Scalability | 🔴 Critical | ⚡ Quick win

String allocations on the hot path.

GetGrpcServiceName performs substring allocations (clientTypeName[(lastDot + 1)..] and service[..^6]) every time an RPC activity starts. Cache the resolved service name per clientTypeName to eliminate these allocations on the hot path. As per path instructions, preventing allocations on hot paths is a top priority.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs`
around lines 39 - 44, The GetGrpcServiceName hot path allocates substrings on
every call. Cache the resolved service name keyed by clientTypeName, return
cached values when available, and only perform the existing suffix and namespace
resolution when populating a new entry.

Source: Path instructions

src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs (1)

280-335: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Fix the Grpc.Core.ClientBase type parameter name for target detection.

The Grpc.Core.ClientBase class is declared with the type parameter TClient (ClientBase<TClient>). Roslyn's FullyQualifiedFormat for generic type definitions includes these exact parameter names. Checking against "global::Grpc.Core.ClientBase<T>" will always return false, silently breaking the gRPC client interception.

Update the checks in both TryGetGrpcNetClientAsyncUnaryInvocation and TryGetGrpcNetClientStreamingInvocation to use TClient.

🐛 Proposed fixes
     private static bool TryGetGrpcNetClientAsyncUnaryInvocation(IMethodSymbol symbol, out InterceptorTarget target)
     {
         target = default;
         if (!IsConstructedFrom(symbol.ReturnType, "global::Grpc.Core.AsyncUnaryCall<TResponse>") ||
-            !InheritsFromConstructedGeneric(symbol.ContainingType, "global::Grpc.Core.ClientBase<T>"))
+            !InheritsFromConstructedGeneric(symbol.ContainingType, "global::Grpc.Core.ClientBase<TClient>"))
         {
             return false;
         }
     private static bool TryGetGrpcNetClientStreamingInvocation(IMethodSymbol symbol, out InterceptorTarget target)
     {
         target = default;
-        if (!InheritsFromConstructedGeneric(symbol.ContainingType, "global::Grpc.Core.ClientBase<T>"))
+        if (!InheritsFromConstructedGeneric(symbol.ContainingType, "global::Grpc.Core.ClientBase<TClient>"))
             return false;
 
         var kind = default(InterceptorKind);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs`
around lines 280 - 335, Update the ClientBase type checks in
TryGetGrpcNetClientAsyncUnaryInvocation and
TryGetGrpcNetClientStreamingInvocation to match the declared generic parameter
name, using global::Grpc.Core.ClientBase<TClient> instead of
global::Grpc.Core.ClientBase<T>. Preserve the existing return-type detection and
target construction logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@demos/Qyl.RealQuartzDemo/Program.cs`:
- Around line 124-126: The failure diagnostic in the error-type validation
branch should report the fully qualified expected value,
“System.InvalidOperationException,” to match the predicate. Update the
failures.Add message in the surrounding error span check without changing the
validation logic.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs`:
- Around line 34-38: Add an immediate null guard after QylActivitySource.StartAt
in EntityFrameworkCoreDiagnosticListener.cs (lines 34-38) and
SqlClientDiagnosticListener.cs (lines 68-72), returning before SetEndTime or any
tag/string evaluation when the activity is unobserved.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs`:
- Around line 24-44: Replace the per-event PendingOperations.Count check in
OnEvent with a lightweight atomic bounding mechanism, such as an
Interlocked-maintained counter, so WriteCommandBefore avoids scanning dictionary
buckets. Increment only when an operation is successfully added and decrement
when its matching completion entry is removed, enforcing PendingOperationsCap
without introducing count drift or exceeding the cap under concurrency.
- Around line 24-44: The WriteCommandBefore hot path must not call
PendingOperations.Count for capacity checks. Update the PendingOperations
bookkeeping in SqlClientDiagnosticListener to use a lightweight Interlocked
count or equivalent bounded insertion mechanism, incrementing only for
successfully tracked operations and decrementing when entries are removed on
matching completion events, while preserving the 10,000-entry cap.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs`:
- Around line 44-49: Update TryReadOperationStart to enumerate the payload only
once, extracting both OperationIdKey and TimestampKey during that pass without
calling TryGetPayloadStruct twice. Preserve the existing out-parameter defaults
and return true only when both values are found.
- Around line 44-49: Update TryReadOperationStart to enumerate the payload once,
extracting both OperationIdKey and TimestampKey during that single pass.
Preserve the existing out-parameter defaults and return true only when both
values are found, avoiding the two TryGetPayloadStruct calls and their separate
enumerators.

---

Outside diff comments:
In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs`:
- Around line 280-335: Update the ClientBase type checks in
TryGetGrpcNetClientAsyncUnaryInvocation and
TryGetGrpcNetClientStreamingInvocation to match the declared generic parameter
name, using global::Grpc.Core.ClientBase<TClient> instead of
global::Grpc.Core.ClientBase<T>. Preserve the existing return-type detection and
target construction logic.

In `@src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs`:
- Around line 133-136: Replace the LINQ-based Where/Select pipeline in
ToTagValues with an allocation-free manual loop over StringValues, filtering
null entries and populating the returned string array directly. Preserve the
empty result for values.Count == 0 and avoid boxing, iterator creation, and
other LINQ allocations on this hot path.

In `@src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs`:
- Around line 39-44: Update GetGrpcServiceName to cache the resolved service
name keyed by clientTypeName, returning the cached value on repeated calls and
computing it only on a cache miss. Preserve the existing namespace stripping and
trailing “Client” removal behavior while ensuring the RPC activity hot path
avoids repeated substring allocations.
- Around line 39-44: The GetGrpcServiceName hot path allocates substrings on
every call. Cache the resolved service name keyed by clientTypeName, return
cached values when available, and only perform the existing suffix and namespace
resolution when populating a new entry.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 87893845-8aef-4088-bfbb-bc0e3d3d16cd

📥 Commits

Reviewing files that changed from the base of the PR and between 0a9af3f and 299b7bc.

⛔ Files ignored due to path filters (1)
  • docs/generated/qyl-aot-contract.resolved.yaml is excluded by !**/generated/**, !**/Generated/**, !**/generated/**
📒 Files selected for processing (50)
  • CHANGELOG.md
  • demos/Qyl.RealAdoNetDemo/Program.cs
  • demos/Qyl.RealElasticTransportDemo/Program.cs
  • demos/Qyl.RealElasticsearchDemo/Program.cs
  • demos/Qyl.RealGraphQlDemo/Program.cs
  • demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • demos/Qyl.RealILoggerDemo/Program.cs
  • demos/Qyl.RealMassTransitDemo/Program.cs
  • demos/Qyl.RealMongoDbDemo/Program.cs
  • demos/Qyl.RealMySqlConnectorDemo/Program.cs
  • demos/Qyl.RealMySqlDataDemo/Program.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • demos/Qyl.RealOracleMdaDemo/Program.cs
  • demos/Qyl.RealQuartzDemo/Program.cs
  • demos/Qyl.RealRabbitMqDemo/Program.cs
  • demos/Qyl.RealRedisDemo/Program.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • demos/Qyl.RealSqliteDemo/Program.cs
  • demos/Qyl.RealWcfClientDemo/Program.cs
  • docs/contracts/qyl-aot-ownership.yaml
  • docs/coverage-matrix.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylActivityStatus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • tools/generate-contract-artifacts.py
  • tools/verify-environment-options-behavior.py
💤 Files with no reviewable changes (1)
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/AspNetCore/AspNetCoreDiagnosticListener.cs
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: webapi-aot-demo (ubuntu-24.04-arm)
  • GitHub Check: webapi-aot-demo (macos-latest)
  • GitHub Check: verify (macos-latest)
  • GitHub Check: verify (ubuntu-24.04-arm)
⚠️ CI failures not shown inline (4)

GitHub Actions: qyl-smoketest / smoke (ubuntu-24.04-arm): Converge auto-instrumentation for 8.0

Conclusion: failure

View job details

##[group]Run bash tools/smoketest.sh
 �[36;1mbash tools/smoketest.sh�[0m
 shell: /usr/bin/bash -e {0}
 env:
   DOTNET_ROOT: /usr/share/dotnet
 ##[endgroup]
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:07.20
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:00.94
 Unhandled exception. System.InvalidOperationException: Unexpected Qyl.Sdk telemetry composition: qylHttpClientSpans=1, nativeHttpClientSpans=1, rawHttpClientDurationMeasurements=1, exportedHttpClientDurationMetrics=1, exportedHttpClientDurationSeries=1, exportedHttpClientDurationMeasurements=1.
    at Program.<Main>$(String[] args) in /tmp/qyl-smoke/pkg-consumer/Program.cs:line 150
    at Program.<Main>$(String[] args) in /tmp/qyl-smoke/pkg-consumer/Program.cs:line 183
    at Program.<Main>(String[] args)
 tools/smoketest.sh: line 518:  3612 Aborted                 (core dumped) dotnet "$dir/bin/Release/net10.0/Consumer.dll" > "$managed_out"
 ##[error]Process completed with exit code 134.

GitHub Actions: qyl-smoketest / smoke (macos-latest): Converge auto-instrumentation for 8.0

Conclusion: failure

View job details

##[group]Run bash tools/smoketest.sh
 �[36;1mbash tools/smoketest.sh�[0m
 shell: /bin/bash -e {0}
 env:
   DOTNET_ROOT: /Users/runner/.dotnet
 ##[endgroup]
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:07.25
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:00.80
 Unhandled exception. System.InvalidOperationException: Unexpected Qyl.Sdk telemetry composition: qylHttpClientSpans=1, nativeHttpClientSpans=1, rawHttpClientDurationMeasurements=1, exportedHttpClientDurationMetrics=1, exportedHttpClientDurationSeries=1, exportedHttpClientDurationMeasurements=1.
    at Program.<Main>$(String[] args) in /private/var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/T/qyl-smoke/pkg-consumer/Program.cs:line 150
    at Program.<Main>$(String[] args) in /private/var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/T/qyl-smoke/pkg-consumer/Program.cs:line 183
    at Program.<Main>(String[] args)
 tools/smoketest.sh: line 518: 30425 Abort trap: 6           dotnet "$dir/bin/Release/net10.0/Consumer.dll" > "$managed_out"
 ##[error]Process completed with exit code 134.

GitHub Actions: qyl-smoketest / 0_smoke (macos-latest).txt: Converge auto-instrumentation for 8.0

Conclusion: failure

View job details

##[group]Run bash tools/smoketest.sh
 �[36;1mbash tools/smoketest.sh�[0m
 shell: /bin/bash -e {0}
 env:
   DOTNET_ROOT: /Users/runner/.dotnet
 ##[endgroup]
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:07.25
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:00.80
 Unhandled exception. System.InvalidOperationException: Unexpected Qyl.Sdk telemetry composition: qylHttpClientSpans=1, nativeHttpClientSpans=1, rawHttpClientDurationMeasurements=1, exportedHttpClientDurationMetrics=1, exportedHttpClientDurationSeries=1, exportedHttpClientDurationMeasurements=1.
    at Program.<Main>$(String[] args) in /private/var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/T/qyl-smoke/pkg-consumer/Program.cs:line 150
    at Program.<Main>$(String[] args) in /private/var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/T/qyl-smoke/pkg-consumer/Program.cs:line 183
    at Program.<Main>(String[] args)
 tools/smoketest.sh: line 518: 30425 Abort trap: 6           dotnet "$dir/bin/Release/net10.0/Consumer.dll" > "$managed_out"
 ##[error]Process completed with exit code 134.

GitHub Actions: qyl-smoketest / 1_smoke (ubuntu-24.04-arm).txt: Converge auto-instrumentation for 8.0

Conclusion: failure

View job details

##[group]Run bash tools/smoketest.sh
 �[36;1mbash tools/smoketest.sh�[0m
 shell: /usr/bin/bash -e {0}
 env:
   DOTNET_ROOT: /usr/share/dotnet
 ##[endgroup]
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:07.20
 Build succeeded.
     0 Warning(s)
     0 Error(s)
 Time Elapsed 00:00:00.94
 Unhandled exception. System.InvalidOperationException: Unexpected Qyl.Sdk telemetry composition: qylHttpClientSpans=1, nativeHttpClientSpans=1, rawHttpClientDurationMeasurements=1, exportedHttpClientDurationMetrics=1, exportedHttpClientDurationSeries=1, exportedHttpClientDurationMeasurements=1.
    at Program.<Main>$(String[] args) in /tmp/qyl-smoke/pkg-consumer/Program.cs:line 150
    at Program.<Main>$(String[] args) in /tmp/qyl-smoke/pkg-consumer/Program.cs:line 183
    at Program.<Main>(String[] args)
 tools/smoketest.sh: line 518:  3612 Aborted                 (core dumped) dotnet "$dir/bin/Release/net10.0/Consumer.dll" > "$managed_out"
 ##[error]Process completed with exit code 134.
🧰 Additional context used
📓 Path-based instructions (16)
**/*.{cs,csproj,props,targets}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{cs,csproj,props,targets}: Preserve the supported public API surface, including Hosting Boot()/AddQylAutoInstrumentation(...), Qyl.Sdk AddQyl(...)/QylSdkOptions, core AddQylAspNetCoreInstrumentation(), and the DiagnosticListeners subscriber surface.
Keep the interceptor namespaces distinct: emitted interceptor methods belong to Qyl.OpenTelemetry.AutoInstrumentation.Generated, while runtime ABI helpers belong to Qyl.OpenTelemetry.AutoInstrumentation.GeneratedCode.
Do not rename either generated namespace or alter the buildTransitive InterceptorsNamespaces wiring.
Prefer a first-class runtime or DI hook when it owns the behavior; intercept a source-visible call only when that is the required substrate, and do not let two generators own the same call site.
Keep the SDK pin at .NET 10.0.302 with latestFeature, and update global.json, the corresponding documentation, and the stated pinning guidance together when bumping it.
Generated source must be owned by source-generator snapshots; runtime and protocol claims require real execution with structural assertions over emitted telemetry.
Do not use hand-shaped OTLP JSON, fabricated identifiers or timestamps, protobuf-byte substring searches, or echo-input mocks as interoperability proof; use official OTLP protobuf types and a real loopback receiver.

Files:

  • demos/Qyl.RealGraphQlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylActivityStatus.cs
  • demos/Qyl.RealAdoNetDemo/Program.cs
  • demos/Qyl.RealSqliteDemo/Program.cs
  • demos/Qyl.RealMySqlConnectorDemo/Program.cs
  • demos/Qyl.RealElasticTransportDemo/Program.cs
  • demos/Qyl.RealMySqlDataDemo/Program.cs
  • demos/Qyl.RealILoggerDemo/Program.cs
  • demos/Qyl.RealRedisDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • demos/Qyl.RealMassTransitDemo/Program.cs
  • demos/Qyl.RealElasticsearchDemo/Program.cs
  • demos/Qyl.RealQuartzDemo/Program.cs
  • demos/Qyl.RealOracleMdaDemo/Program.cs
  • demos/Qyl.RealRabbitMqDemo/Program.cs
  • demos/Qyl.RealMongoDbDemo/Program.cs
  • demos/Qyl.RealWcfClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs
  • demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
**/*.cs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.cs: Keep generated ABI helpers in Qyl.OpenTelemetry.AutoInstrumentation.GeneratedCode; mark every member [EditorBrowsable(EditorBrowsableState.Never)], preserve QylGeneratedCodeAbi.V8, and bump the V<major> anchor on breaking ABI changes.
Generated interceptors must reference the generated-code ABI anchor and must not reference QylAutoInstrumentationOptions or QylInstrumentationDomains; gate opt-ins at policy types and emit domain names as literals.
Keep EntityFrameworkCoreAutoInstrumentationBootstrap and SqlClientAutoInstrumentationBootstrap under Qyl.OpenTelemetry.AutoInstrumentation.GeneratedCode and hidden with [EditorBrowsable(EditorBrowsableState.Never)].
Keep implementation types, semantic helpers, listeners, meter inventory, and runtime state internal; use IVT for cross-assembly access rather than widening types to public.
Use SemanticModel.GetInterceptableLocation(...) and ordinary generated C# for Roslyn interceptor implementation.

Files:

  • demos/Qyl.RealGraphQlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylActivityStatus.cs
  • demos/Qyl.RealAdoNetDemo/Program.cs
  • demos/Qyl.RealSqliteDemo/Program.cs
  • demos/Qyl.RealMySqlConnectorDemo/Program.cs
  • demos/Qyl.RealElasticTransportDemo/Program.cs
  • demos/Qyl.RealMySqlDataDemo/Program.cs
  • demos/Qyl.RealILoggerDemo/Program.cs
  • demos/Qyl.RealRedisDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • demos/Qyl.RealMassTransitDemo/Program.cs
  • demos/Qyl.RealElasticsearchDemo/Program.cs
  • demos/Qyl.RealQuartzDemo/Program.cs
  • demos/Qyl.RealOracleMdaDemo/Program.cs
  • demos/Qyl.RealRabbitMqDemo/Program.cs
  • demos/Qyl.RealMongoDbDemo/Program.cs
  • demos/Qyl.RealWcfClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs
  • demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
**/*.{cs,csproj}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{cs,csproj}: Keep missing runtime values missing, bound span names and metric dimensions, and apply the repository's explicit sensitive-value redaction and opt-in controls.
Update analyzer-managed shipped/unshipped API baselines for public API changes; release work must pack, restore into a clean consumer, run managed and NativeAOT smoke tests, and validate published artifacts.

Files:

  • demos/Qyl.RealGraphQlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylActivityStatus.cs
  • demos/Qyl.RealAdoNetDemo/Program.cs
  • demos/Qyl.RealSqliteDemo/Program.cs
  • demos/Qyl.RealMySqlConnectorDemo/Program.cs
  • demos/Qyl.RealElasticTransportDemo/Program.cs
  • demos/Qyl.RealMySqlDataDemo/Program.cs
  • demos/Qyl.RealILoggerDemo/Program.cs
  • demos/Qyl.RealRedisDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • demos/Qyl.RealMassTransitDemo/Program.cs
  • demos/Qyl.RealElasticsearchDemo/Program.cs
  • demos/Qyl.RealQuartzDemo/Program.cs
  • demos/Qyl.RealOracleMdaDemo/Program.cs
  • demos/Qyl.RealRabbitMqDemo/Program.cs
  • demos/Qyl.RealMongoDbDemo/Program.cs
  • demos/Qyl.RealWcfClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs
  • demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
**

⚙️ CodeRabbit configuration file

**: Operating principles (solo-dev, agentic SDLC — reviews are advisory, agents act on them):

  1. LAZY: one self-contained, correct review beats ten partial ones. Every finding is
    definitive — concrete evidence with file:line, a concrete fix, no "consider maybe",
    no open or ambiguous questions back to the author. If you cannot decide a point
    from the diff plus repo context, stay silent on it. Never cite a source, API, or
    version you have not verified; an unverifiable claim is a dropped claim.
  2. IMPATIENT: never stall a PR. Internal and dogfooding-only surfaces converge directly;
    removing shims, breaking internal signatures, and deleting dead paths are normal.
    Published NuGet APIs follow SemVer: breaking changes require a deliberate new major
    and migration of known consumers. Do not request compatibility layers without a
    proven consumer.
  3. EGO: hold the bar of the best reviewer on the market — flag real correctness,
    security, data-loss, and structural problems precisely; produce zero noise.

Files:

  • demos/Qyl.RealGraphQlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylActivityStatus.cs
  • demos/Qyl.RealAdoNetDemo/Program.cs
  • demos/Qyl.RealSqliteDemo/Program.cs
  • demos/Qyl.RealMySqlConnectorDemo/Program.cs
  • demos/Qyl.RealElasticTransportDemo/Program.cs
  • demos/Qyl.RealMySqlDataDemo/Program.cs
  • demos/Qyl.RealILoggerDemo/Program.cs
  • demos/Qyl.RealRedisDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • demos/Qyl.RealMassTransitDemo/Program.cs
  • demos/Qyl.RealElasticsearchDemo/Program.cs
  • demos/Qyl.RealQuartzDemo/Program.cs
  • demos/Qyl.RealOracleMdaDemo/Program.cs
  • demos/Qyl.RealRabbitMqDemo/Program.cs
  • demos/Qyl.RealMongoDbDemo/Program.cs
  • demos/Qyl.RealWcfClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
  • CHANGELOG.md
  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs
  • demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • demos/Qyl.RealNpgsqlDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • demos/Qyl.RealGrpcClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • docs/contracts/qyl-aot-ownership.yaml
  • demos/Qyl.RealSqlClientDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • docs/coverage-matrix.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • tools/verify-environment-options-behavior.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • tools/generate-contract-artifacts.py
  • src/Qyl.OpenTelemetry.AutoInstrumentation/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
src/Qyl.OpenTelemetry.AutoInstrumentation/**/*.{cs,props,targets}

📄 CodeRabbit inference engine (CLAUDE.md)

Do not leak EFCore or SqlClient dependencies, warnings, or NativeAOT constraints into the core runtime package or Hosting package.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylActivityStatus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
src/**/*.cs

⚙️ CodeRabbit configuration file

src/**/*.cs: Zero-code instrumentation runtime: this code runs inside EVERY request of host
applications. Top priorities, in order: (1) allocations and boxing on hot paths —
flag closures, LINQ, params arrays, string concat in listener/semantic-tag code;
(2) tag cardinality — any attribute value that is unbounded (raw URLs, user input,
exception messages) explodes at scale; (3) Activity/Meter lifecycle — undisposed
listeners, leaked subscriptions, double-Start/Stop; (4) thread safety of shared
listener state. PublicAPI.Shipped/Unshipped.txt are analyzer-managed: edits must
come from the analyzer flow. These packages are public; breaking changes require
a deliberate new major and migration of known consumers.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylActivityStatus.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylHttpActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylSemanticAttributes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs
  • src/Qyl.Sdk/QylTelemetrySources.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylSensitiveCapturePolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Detection.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylRpcActivityPolicy.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylMetricMeters.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylInterceptedHttpClient.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/QylAutoInstrumentationOptions.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylCaptureHelpers.cs
src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/**

📄 CodeRabbit inference engine (CLAUDE.md)

Keep EFCore code isolated in Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs
CHANGELOG*

📄 CodeRabbit inference engine (CLAUDE.md)

Keep the changelog synthetic and useful for continuation, not a raw commit dump.

Files:

  • CHANGELOG.md
tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/**

📄 CodeRabbit inference engine (CLAUDE.md)

Source-generator verified snapshots are generated/evidence files and must be updated only through regeneration, not manual edits.

Files:

  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
**/verified/**

📄 CodeRabbit inference engine (CLAUDE.md)

Snapshot/OTLP verified fixture files are generated/evidence files and must not be hand-edited.

Files:

  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
tests/**

⚙️ CodeRabbit configuration file

tests/**: Deterministic synchronization and assertions only. Container-backed integration
tests may use real external services; unit and snapshot tests must not depend on
ambient services. Assert observable telemetry output, not implementation internals.

Files:

  • tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl
src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/**

📄 CodeRabbit inference engine (CLAUDE.md)

Keep Microsoft.Data.SqlClient code isolated in Qyl.OpenTelemetry.AutoInstrumentation.SqlClient.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs
**/*.{yml,yaml,py}

📄 CodeRabbit inference engine (AGENTS.md)

The YAML ownership contract and tools/generate-contract-artifacts.py own generated coverage and conformance artifacts; change inputs or generators, regenerate, and commit outputs together.

Files:

  • docs/contracts/qyl-aot-ownership.yaml
  • tools/verify-environment-options-behavior.py
  • tools/generate-contract-artifacts.py
docs/coverage-matrix.md

📄 CodeRabbit inference engine (COVERAGE_LEDGER.md)

Keep the coverage matrix aligned with the current contract classification and implemented coverage state.

Files:

  • docs/coverage-matrix.md
**/*.{sh,py,csproj}

📄 CodeRabbit inference engine (AGENTS.md)

Run the complete local handoff gate with python3 tools/verify-aot-autoinstrumentation-goal.py, inspect its full exit status, and do not mask failures through tail, head, or tee without pipefail.

Files:

  • tools/verify-environment-options-behavior.py
  • tools/generate-contract-artifacts.py
**/PublicAPI.Shipped.txt

📄 CodeRabbit inference engine (CLAUDE.md)

Public API additions and changes must be reflected in PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt baselines next to each packaged project.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation/PublicAPI.Shipped.txt
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-07-19T10:31:40.228Z
Learning: Before judging, planning, or implementing an external library or framework integration, verify the live package registry and upstream repository, explicitly check for successors, and record what was checked and the date.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-07-19T10:31:40.228Z
Learning: When comparing against `qyl-references/` clones, pull them first; correct upstream drift in existing source, meter names, identifiers, and documented claims before adding new integrations.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-07-19T10:31:40.228Z
Learning: Synthetic verifier consumers must compile against the public surface only; fix consumers when types become internal, and grant narrowly named IVT access only to probers that genuinely require internals.
🔇 Additional comments (39)
demos/Qyl.RealNpgsqlDemo/Program.cs (1)

8-8: LGTM!

Also applies to: 24-24, 130-130, 162-166

demos/Qyl.RealSqlClientDemo/Program.cs (1)

2-2: LGTM!

Also applies to: 27-49, 65-68, 98-104, 123-193, 203-208, 220-240, 295-299

demos/Qyl.RealElasticTransportDemo/Program.cs (1)

107-107: LGTM!

demos/Qyl.RealElasticsearchDemo/Program.cs (1)

98-99: LGTM!

demos/Qyl.RealRabbitMqDemo/Program.cs (1)

139-139: LGTM!

demos/Qyl.RealRedisDemo/Program.cs (1)

123-123: LGTM!

demos/Qyl.RealSqliteDemo/Program.cs (1)

105-105: LGTM!

demos/Qyl.RealWcfClientDemo/Program.cs (1)

100-126: LGTM!

tools/Qyl.OpenTelemetry.AutoInstrumentation.WebApiAotDemo/Program.cs (1)

195-196: LGTM!

Also applies to: 219-221

demos/Qyl.RealGraphQlDemo/Program.cs (1)

133-133: LGTM!

demos/Qyl.RealILoggerDemo/Program.cs (1)

113-113: LGTM!

demos/Qyl.RealMassTransitDemo/Program.cs (1)

139-139: LGTM!

demos/Qyl.RealMongoDbDemo/Program.cs (1)

131-131: LGTM!

demos/Qyl.RealMySqlConnectorDemo/Program.cs (1)

88-88: LGTM!

demos/Qyl.RealMySqlDataDemo/Program.cs (1)

88-88: LGTM!

demos/Qyl.RealOracleMdaDemo/Program.cs (1)

95-95: LGTM!

CHANGELOG.md (1)

8-83: LGTM!

demos/Qyl.RealAdoNetDemo/Program.cs (1)

111-111: LGTM!

src/Qyl.Sdk/QylTelemetrySources.cs (1)

13-75: LGTM!

demos/Qyl.RealGrpcClientDemo/LiveProbeClient.cs (1)

1-44: LGTM!

demos/Qyl.RealGrpcClientDemo/Program.cs (1)

74-85: LGTM!

Also applies to: 183-204

src/Qyl.OpenTelemetry.AutoInstrumentation.DiagnosticListeners/QylDiagnosticListenerSubscriber.cs (1)

34-37: LGTM!

Also applies to: 46-48

tools/verify-environment-options-behavior.py (1)

253-258: LGTM!

Also applies to: 440-451

src/Qyl.OpenTelemetry.AutoInstrumentation/PublicAPI.Shipped.txt (2)

7-8: LGTM!

Also applies to: 39-89


7-8: LGTM!

Also applies to: 39-89

src/Qyl.OpenTelemetry.AutoInstrumentation/QylActivitySource.cs (2)

45-59: LGTM!


45-59: LGTM!

src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCorePayloadReader.cs (2)

28-30: LGTM!

Also applies to: 58-60


28-30: LGTM!

Also applies to: 58-60

src/Qyl.OpenTelemetry.AutoInstrumentation/Internal/QylDbActivityPolicy.cs (2)

4-13: LGTM!

Also applies to: 26-27, 42-55


4-13: LGTM!

Also applies to: 26-27, 42-55

src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Descriptors.cs (1)

10-151: LGTM!

src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.Shapes.cs (1)

58-177: LGTM!

Also applies to: 360-381, 786-851

src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylAutoInstrumentationGenerator.cs (1)

45-47: LGTM!

Also applies to: 157-219, 255-290, 556-743

src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/QylGeneratedSourceInterceptorCatalog.cs (1)

9-13: LGTM!

Also applies to: 30-37

tests/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators.Snapshots/verified/QylAutoInstrumentation.ContractManifests.verified.jsonl (1)

11-15: LGTM!

tools/generate-contract-artifacts.py (1)

19-19: LGTM!

Also applies to: 102-111, 142-142, 173-266, 297-297, 374-510, 547-552, 566-610, 643-646, 738-738, 889-889, 916-943, 995-1001, 1090-1099, 1122-1157, 1182-1182, 1262-1264

docs/contracts/qyl-aot-ownership.yaml (1)

979-1026: LGTM!

docs/coverage-matrix.md (1)

27-48: LGTM!

Also applies to: 106-109

Comment on lines 124 to 126
else if (!error.Tags.TryGetValue(Qyl.OpenTelemetry.SemanticConventions.Attributes.Error.ErrorAttributes.Type, out var errorType) ||
!StringComparer.Ordinal.Equals(errorType, "InvalidOperationException"))
!StringComparer.Ordinal.Equals(errorType, "System.InvalidOperationException"))
failures.Add("expected error.type=InvalidOperationException on error span");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the stale failure diagnostic.

The predicate now requires System.InvalidOperationException, but Line 126 still reports InvalidOperationException. A failing probe will therefore give the wrong expected value.

Proposed fix
-            failures.Add("expected error.type=InvalidOperationException on error span");
+            failures.Add("expected error.type=System.InvalidOperationException on error span");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
else if (!error.Tags.TryGetValue(Qyl.OpenTelemetry.SemanticConventions.Attributes.Error.ErrorAttributes.Type, out var errorType) ||
!StringComparer.Ordinal.Equals(errorType, "InvalidOperationException"))
!StringComparer.Ordinal.Equals(errorType, "System.InvalidOperationException"))
failures.Add("expected error.type=InvalidOperationException on error span");
else if (!error.Tags.TryGetValue(Qyl.OpenTelemetry.SemanticConventions.Attributes.Error.ErrorAttributes.Type, out var errorType) ||
!StringComparer.Ordinal.Equals(errorType, "System.InvalidOperationException"))
failures.Add("expected error.type=System.InvalidOperationException on error span");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@demos/Qyl.RealQuartzDemo/Program.cs` around lines 124 - 126, The failure
diagnostic in the error-type validation branch should report the fully qualified
expected value, “System.InvalidOperationException,” to match the predicate.
Update the failures.Add message in the surrounding error span check without
changing the validation logic.

Comment on lines +34 to +38
using var activity = QylActivitySource.StartAt(
QylActivityNames.DbCommand(command.Operation),
ActivityKind.Client,
command.StartTime);
activity?.SetEndTime((command.StartTime + command.Duration).UtcDateTime);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🔴 Critical | ⚡ Quick win

Missing early return for unobserved Activity on the hot path. QylActivitySource.StartAt returns null when there are no listeners. Failing to check for null causes the listener to needlessly evaluate tags and string allocations for unobserved telemetry. As per path instructions, preventing overhead on hot paths is a top priority.

  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs#L34-L38: Add if (activity is null) return; immediately after StartAt.
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs#L68-L72: Add the same early return guard here.
📍 Affects 2 files
  • src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs#L34-L38 (this comment)
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs#L68-L72
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore/EntityFrameworkCoreDiagnosticListener.cs`
around lines 34 - 38, Add an immediate null guard after
QylActivitySource.StartAt in EntityFrameworkCoreDiagnosticListener.cs (lines
34-38) and SqlClientDiagnosticListener.cs (lines 68-72), returning before
SetEndTime or any tag/string evaluation when the activity is unobserved.

Source: Path instructions

Comment on lines +24 to +44
/// <summary>In-flight command start timestamps, keyed by the diagnostic OperationId. Entries are
/// removed on the matching After/Error event; the size cap guards against events whose completion
/// never fires (killed connections) from accumulating forever.</summary>
private static readonly System.Collections.Concurrent.ConcurrentDictionary<Guid, long> PendingOperations = new();

private const int PendingOperationsCap = 10_000;

/// <inheritdoc/>
protected override void OnEvent(string name, object? payload)
{
if (StringComparer.Ordinal.Equals(name, "Microsoft.Data.SqlClient.WriteCommandBefore"))
{
if (SqlClientPayloadReader.TryReadOperationStart(payload, out var operationId, out var startTimestamp) &&
PendingOperations.Count < PendingOperationsCap)
{
PendingOperations[operationId] = startTimestamp;
}

return;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🔴 Critical | 🏗️ Heavy lift

High overhead on hot path from ConcurrentDictionary.Count.

Evaluating PendingOperations.Count on every WriteCommandBefore event forces the dictionary to sum the counts across all its internal buckets, which scales poorly under concurrent load. Track the count with a separate Interlocked field or use a lightweight bounding mechanism. As per path instructions, preventing overhead on hot paths is a top priority.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs`
around lines 24 - 44, Replace the per-event PendingOperations.Count check in
OnEvent with a lightweight atomic bounding mechanism, such as an
Interlocked-maintained counter, so WriteCommandBefore avoids scanning dictionary
buckets. Increment only when an operation is successfully added and decrement
when its matching completion entry is removed, enforcing PendingOperationsCap
without introducing count drift or exceeding the cap under concurrency.

Source: Path instructions


🚀 Performance & Scalability | 🔴 Critical | 🏗️ Heavy lift

High overhead on hot path from ConcurrentDictionary.Count.

Evaluating PendingOperations.Count on every WriteCommandBefore event forces the dictionary to sum the counts across all its internal buckets, which scales poorly under concurrent load. Track the count with a separate Interlocked field or use a lightweight bounding mechanism. As per path instructions, preventing overhead on hot paths is a top priority.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientDiagnosticListener.cs`
around lines 24 - 44, The WriteCommandBefore hot path must not call
PendingOperations.Count for capacity checks. Update the PendingOperations
bookkeeping in SqlClientDiagnosticListener to use a lightweight Interlocked
count or equivalent bounded insertion mechanism, incrementing only for
successfully tracked operations and decrementing when entries are removed on
matching completion events, while preserving the 10,000-entry cap.

Source: Path instructions

Comment on lines +44 to +49
public static bool TryReadOperationStart(object? payload, out Guid operationId, out long timestamp)
{
timestamp = 0;
return TryGetPayloadStruct(payload, OperationIdKey, out operationId) &&
TryGetPayloadStruct(payload, TimestampKey, out timestamp);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🔴 Critical | ⚡ Quick win

Multiple allocations and redundant iterations on hot path.

TryReadOperationStart calls TryGetPayloadStruct twice, resulting in two full iterations over the payload IEnumerable and allocating two enumerators on the hot path. Extract both keys in a single pass to eliminate the redundant iteration and allocation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs`
around lines 44 - 49, Update TryReadOperationStart to enumerate the payload only
once, extracting both OperationIdKey and TimestampKey during that pass without
calling TryGetPayloadStruct twice. Preserve the existing out-parameter defaults
and return true only when both values are found.

🚀 Performance & Scalability | 🔴 Critical | ⚡ Quick win

Multiple allocations and redundant iterations on hot path.

TryReadOperationStart calls TryGetPayloadStruct twice, resulting in two full iterations over the payload IEnumerable and allocating two enumerators on the hot path. Extract both keys in a single pass to eliminate the redundant iteration and allocation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.SqlClient/SqlClientPayloadReader.cs`
around lines 44 - 49, Update TryReadOperationStart to enumerate the payload
once, extracting both OperationIdKey and TimestampKey during that single pass.
Preserve the existing out-parameter defaults and return true only when both
values are found, avoiding the two TryGetPayloadStruct calls and their separate
enumerators.

ANcpLua added a commit that referenced this pull request Jul 19, 2026
…eview findings fixed

Full local handoff gate green (all sections; smoketest rerun after
expectation fix). Supersedes PRs #38 and #39.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ANcpLua
ANcpLua merged commit 299b7bc into main Jul 19, 2026
5 of 9 checks passed
@ANcpLua
ANcpLua deleted the codex/8.0-feasibility-convergence branch July 19, 2026 10:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 299b7bcb54

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +64 to +65
if (QylDbActivityPolicy.HasCurrentActivityFor(command.Command))
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Suppress SqlClient fallback only for SqlClient-owned spans

When a SQL command is invoked through a DbCommand-typed variable or factory result, the source generator emits the generic ADONET interceptor, which records an in-flight activity for the same command. This new guard then drops the SqlClient diagnostic completion, so the operation is reported as generic other_sql/ADONET and the SQLCLIENT span attributes/metrics are lost in the default configuration; the fallback should only be suppressed when the in-flight interceptor activity was actually emitted for SQLCLIENT.

Useful? React with 👍 / 👎.

// create their activities through the sampler (proper root sampling decisions, honored
// upstream traceparent) instead of the legacy unsampled DiagnosticListener fallback.
AddIfEnabled(names, options, QylAutoInstrumentationIds.AspNetCore, AspNetCore);
AddIfEnabled(names, options, QylAutoInstrumentationIds.HttpClient, HttpClient);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid exporting native HttpClient spans alongside qyl spans

With AddQyl() and HTTPCLIENT traces enabled, source-generated QylInterceptedHttpClient already emits the qyl client span and only coordinates with the DiagnosticListener lane. Adding System.Net.Http to the OpenTelemetry sources also exports the BCL ActivitySource span for the same request on runtimes where that source fires, because QylSignalOwnership is not consulted by OpenTelemetry's native source subscription; this produces duplicate client spans instead of the intended single qyl-owned operation.

Useful? React with 👍 / 👎.

Comment on lines +36 to +37
if (SqlClientPayloadReader.TryReadOperationStart(payload, out var operationId, out var startTimestamp) &&
PendingOperations.Count < PendingOperationsCap)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Evict stale SqlClient starts before hitting the cap

When a long-running process sees WriteCommandBefore events whose matching completion never arrives, this cap fills with stale operation IDs and then permanently stops recording new start timestamps. From that point every SqlClient fallback span uses a zero duration (endTime - TimeSpan.Zero), so all subsequent SQL spans in that process are exported with near-zero durations until restart; the cap needs eviction or cleanup rather than only refusing new inserts.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant