Skip to content

feat(collector)!: complete the OTel AutoInstrumentation 4.0.0 cutover - #458

Merged
github-actions[bot] merged 3 commits into
mainfrom
claude/qyl-otel-4.0.0-cutover
Jul 1, 2026
Merged

feat(collector)!: complete the OTel AutoInstrumentation 4.0.0 cutover#458
github-actions[bot] merged 3 commits into
mainfrom
claude/qyl-otel-4.0.0-cutover

Conversation

@ANcpLua

@ANcpLua ANcpLua commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Completes the qyl side of the Qyl.OpenTelemetry.AutoInstrumentation 4.0.0 migration
(external PR ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation#20, published + indexed on nuget.org).
4.0.0 removed QylInterceptedAspNetCore.Build and injects the ASP.NET Core server-span
middleware via IStartupFilter instead of a Build() interceptor.

Includes the fleet's generator-half commit (3382f960) + the consumer half:

Generator half (fleet, 3382f960)

  • GeneratorPipelineHelpers: drop QylInterceptedAspNetCoreTypeName + IsOtelAutoInstrumentationReferenced
  • ServiceDefaultsSourceGenerator: drop the otelAutoInstrumentationAvailable stage + the QYL0138 fail-fast → emit plain builder.Build()
  • AnalyzerReleases.Unshipped.md: drop the QYL0138 row (RS2002)

Consumer half (this)

  • Directory.Packages.props: pin 3.1.2 → 4.0.0
  • qyl.collector.csproj: drop the QylAutoInstrumentationInterceptWebApplicationBuilderBuild opt-out knob (the OTel generator no longer intercepts Build(), so there's nothing to yield)
  • Program.cs: builder.Services.AddQylAspNetCoreInstrumentation() — restores the server-request span the removed Build() interceptor used to wire

Verification

dotnet build services/qyl.collector -c Release0 warnings / 0 errors against published 4.0.0. ServiceDefaults owns Build() alone now → no CS9153.

⚠️ Orthogonal CI blocker

CI's collector build will red-fail on NU1903 — a live advisory on transitive Microsoft.OpenApi 2.0.0 (via Microsoft.AspNetCore.OpenApi, a framework dep). It's unrelated to this change (4.0.0 has no OpenApi dependency) and fails any collector build repo-wide until deps are refreshed. Verified clean with the audit isolated.

🤖 Generated with Claude Code

ANcpLua and others added 2 commits July 1, 2026 11:15
Qyl.OpenTelemetry.AutoInstrumentation no longer intercepts WebApplicationBuilder.Build()
(it moved its ASP.NET Core middleware to an IStartupFilter). The cross-generator
coordination that let qyl's ServiceDefaults Build() interceptor coexist with the package's
Build() interceptor is now dead, so remove it:

- GeneratorPipelineHelpers: drop QylInterceptedAspNetCoreTypeName + IsOtelAutoInstrumentationReferenced.
- ServiceDefaultsSourceGenerator: drop the otelAutoInstrumentationAvailable pipeline stage, the
  BuilderInterceptorInput field it fed, and the QYL0138 fail-fast diagnostic (there is no longer a
  package whose absence would silently drop OTel middleware).
- AnalyzerReleases.Unshipped.md: remove the QYL0138 row to match the deleted descriptor (fixes RS2002).

Generator project builds green (0 warnings/0 errors). Pairs with the AutoInstrumentation-side cut.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…4.0.0 cutover

Pairs with the generator-side cut (drop the Build() compose + QYL0138) to finish
the lockstep migration to 4.0.0, which removed QylInterceptedAspNetCore.Build and
injects the ASP.NET Core server-span middleware via IStartupFilter instead.

- Directory.Packages.props: pin 3.1.2 -> 4.0.0
- qyl.collector.csproj: drop the QylAutoInstrumentationInterceptWebApplicationBuilderBuild
  opt-out knob (no longer needed — the OTel generator no longer intercepts Build()).
- Program.cs: builder.Services.AddQylAspNetCoreInstrumentation() so the collector keeps
  its server-request span (the Build() interceptor that used to wire it is gone).

Verified: `dotnet build services/qyl.collector -c Release` succeeds 0/0 against the
published 4.0.0 (ServiceDefaults owns Build() alone -> no CS9153). The unrelated NU1903
Microsoft.OpenApi advisory (transitive via Microsoft.AspNetCore.OpenApi) is orthogonal
to this change and blocks any collector build repo-wide until deps are refreshed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 1, 2026 09:19
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
github-actions Bot enabled auto-merge (squash) July 1, 2026 09:19
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cdf609c7-3655-4e8e-81a0-207e810d5dc5

📥 Commits

Reviewing files that changed from the base of the PR and between ec44751 and 2f92eb4.

📒 Files selected for processing (1)
  • Directory.Packages.props
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Backend (.NET)
  • GitHub Check: Dependency Audit
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{cs,csx,csproj,props}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

.NET code must have nullable enabled.

Files:

  • Directory.Packages.props
**/Directory.Packages.props

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use central package management via Directory.Packages.props.

Files:

  • Directory.Packages.props
**

⚙️ CodeRabbit configuration file

AGENTS.md

**:

10.0.9
10.7.0
10.7.0
1.16.0
1.15.1
1.5.3
3.35.1
2.80.0
2.81.1

2.2.29
1.11.0

<!-- MAF (Microsoft.Agents.AI.*) — mirrors SDK truth; inlined so the repo builds with or without the sibling SDK checkout. -->
<MicrosoftAgentsAIVersion>1.11.0</MicrosoftAgentsAIVersion>
<MicrosoftAgentsAIHostingVersion>1.11.0-preview.260623.1</MicrosoftAgentsAIHostingVersion>

<NukeVersion>10.1.0</NukeVersion>
<SpectreConsoleVersion>0.57.0</SpectreConsoleVersion>
<VersionizeVersion>2.5.0</VersionizeVersion>

**:

<Import Project="$(MSBuildThisFileDirectory)../framework/ANcpLua.NET.Sdk/src/Build/Common/Version.props"
...

Files:

  • Directory.Packages.props
**/*.props

⚙️ CodeRabbit configuration file

MSBuild property files (Directory.Build.props, Directory.Packages.props, Version.props). Review for: Central Package Management correctness, version consistency, and that new packages are added with explicit version pins. Flag transitive dependency promotions that aren't justified. Verify TFM targeting is correct (.NET 10).

Files:

  • Directory.Packages.props
🔇 Additional comments (2)
Directory.Packages.props (2)

45-48: LGTM! Confirmed 2.7.5 is the first patched 2.x release for GHSA-v5pm-xwqc-g5wc.


81-81: LGTM! Explicit version pin, consistent with central package management.


Summary by CodeRabbit

  • Chores
    • Updated bundled NuGet package versions, including adding a transitive security override for Microsoft.OpenApi and upgrading OpenTelemetry auto-instrumentation to a newer major release.

Walkthrough

Central package management was updated in Directory.Packages.props to add a Microsoft.OpenApi override at 2.7.5 and bump Qyl.OpenTelemetry.AutoInstrumentation from 3.1.2 to 4.0.0.

Changes

Central package updates

Layer / File(s) Summary
OpenApi override
Directory.Packages.props
Adds a centralized Microsoft.OpenApi version override to 2.7.5 with a comment.
AutoInstrumentation bump
Directory.Packages.props
Updates Qyl.OpenTelemetry.AutoInstrumentation from 3.1.2 to 4.0.0.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: area:infra, breaking


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Title check ❌ Error The title matches the change, but the scope collector is not one of the allowed scopes. Use an allowed conventional-commit scope such as infra and keep the title concise.
✅ Passed checks (7 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly describes the OTel 4.0.0 migration and related collector changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Otel Instrumentation Required ✅ Passed No new local DI-registered service class was introduced; the only DI hook is external instrumentation, and collector telemetry already uses QylTelemetry ActivitySource/Meter.
No Unbounded Mcp Responses ✅ Passed No src/qyl.mcp tree exists in this repo, and the diff shows no MCP tool-definition changes.
Duckdb Backpressure On Write Paths ✅ Passed No new DuckDB write path is added; the diff only touches package versions and instrumentation wiring, not storage code.
Cancellationtoken Threading ✅ Passed No C# files were changed under src/**, so this PR adds no public async methods in the checked scope.

Comment @coderabbitai help to get the list of available commands.

Copilot AI 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.

Pull request overview

Completes the in-repo portion of the migration to Qyl.OpenTelemetry.AutoInstrumentation 4.0.0, removing the previous WebApplicationBuilder.Build() interception composition point and explicitly registering the ASP.NET Core server-span middleware via DI.

Changes:

  • Bumps Qyl.OpenTelemetry.AutoInstrumentation from 3.1.2 to 4.0.0 in central package management.
  • Removes the collector opt-out property that previously prevented Build() interceptor collisions (CS9153).
  • Updates the ServiceDefaults source generator to emit a plain builder.Build() interceptor and drops the QYL0138 fail-fast path that required the OTel package.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Directory.Packages.props Pins Qyl.OpenTelemetry.AutoInstrumentation to 4.0.0.
services/qyl.collector/qyl.collector.csproj Removes the now-obsolete Build() interception opt-out property.
services/qyl.collector/Program.cs Explicitly registers AddQylAspNetCoreInstrumentation() for server-request spans.
internal/qyl.instrumentation.generators/ServiceDefaultsSourceGenerator.cs Removes QYL0138 enforcement and emits builder.Build() directly.
internal/qyl.instrumentation.generators/GeneratorPipelineHelpers.cs Deletes OTel-reference detection helpers no longer used by the generator pipeline.
internal/qyl.instrumentation.generators/AnalyzerReleases/AnalyzerReleases.Unshipped.md Removes the unshipped QYL0138 entry.

var buildExpression = $"global::{GeneratorPipelineHelpers.QylInterceptedAspNetCoreTypeName}.Build(builder)";

// Wire qyl ServiceDefaults (conventions, generated service + health-check registration, and
// default endpoints) at the single WebApplicationBuilder.Build() call site, then build the host.
…c-g5wc)

Microsoft.AspNetCore.OpenApi pulls Microsoft.OpenApi 2.0.0 transitively, which a
newly-live advisory (GHSA-v5pm-xwqc-g5wc, high) flags — failing the Dependency Audit
+ Backend builds repo-wide (main was last green 2026-06-30, before the advisory).
2.7.5 is the first patched 2.x. Collector runs with EnableOpenApi=false, so this is
not functionally exercised — it only lifts the transitive off the vulnerable range.

Verified: collector Release builds 0/0 with NuGetAudit ON.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai coderabbitai Bot added the breaking label Jul 1, 2026
@github-actions
github-actions Bot merged commit 15fa7e0 into main Jul 1, 2026
5 of 6 checks passed
@ANcpLua
ANcpLua deleted the claude/qyl-otel-4.0.0-cutover branch July 1, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants