Repository navigation
Update Blazor playgrounds to OpenTelemetry 1.19 - #20339
Merged
James Newton-King (JamesNK) merged 1 commit intoSep 23, 2026
Merged
James Newton-King (JamesNK) merged 1 commit into
James Newton-King (JamesNK) merged 1 commit into
Conversation
Remove the browser OTLP background export workaround now that OpenTelemetry 1.19 handles WebAssembly export without IHttpClientFactory integration. Co-authored-by: Copilot <[email protected]> Copilot-Session: 1fb0cde9-afea-4acd-924d-2d5ebcb29be4
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20339Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20339" |
James Newton-King (JamesNK)
approved these changes
Sep 23, 2026
James Newton-King (JamesNK)
left a comment
Member
There was a problem hiding this comment.
Reviewed the OpenTelemetry 1.19 Blazor playground update; no blocking issues found.
5 of 14 tasks
4 of 14 tasks
Jose Perez Rodriguez (joperezr)
added a commit
that referenced
this pull request
Sep 23, 2026
## Description With `release/13.6` snapped from `main`, return the advance `release/14.0` changes to `main` so ongoing development builds 14.0 while 13.6 stabilizes independently. **Merge this PR using a merge commit. Do not squash or rebase.** The branch contains a real merge of `release/14.0` into the current `main`, preserving the release branch's ancestry and all prior forward integrations, including #20364. - Verified `release/13.6` and `main` both pointed to `43ec6c82c7a6807ca80e1f69706d97902d0a2802` before preparing the merge. This PR does not change `release/13.6`. - Integrates `release/14.0` at `55867ce9d33c8800e6c7278f7edc5e88e0f6b839`, including the 14.0.0-preview.1 version bump and existing Docker/Kubernetes dashboard-image override and tests from #20037. - Preserves the newer Blazor playground changes already on `main` (#20339). - Retains the existing `13.6` dashboard-image pin until the matching 14.0 image is published; no additional implementation changes or conflict resolutions were needed. ### Release coordination The temporary **Sync Main to Release 14.0** workflow has been disabled in GitHub Actions before reverse integration. There are no outstanding sync PRs or active sync runs. After this PR lands, remove the temporary workflow and its watchdog configuration entry as documented in `.github/workflows/README.md`. ### Validation The forward-integration CI run [35817778340](https://github.com/microsoft/aspire/actions/runs/35817778340) completed successfully. Locally verified that the reverse integration is conflict-free, that both branch tips are ancestors of this PR head, and that its tree exactly matches Git's computed merge result. The diff against `main` contains only the six existing release-specific files. No new code was authored; this PR's CI will validate the combined tree. Fixes # (issue) ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [ ] No - [x] No Co-authored-by: Copilot App <[email protected]> Copilot-Session: fb09ae10-9023-489a-af37-4e754495bea3
5 of 14 tasks
James Newton-King (JamesNK)
added a commit
that referenced
this pull request
Sep 25, 2026
## Description Preserves wildcard agent-hook coverage and all currently eligible Aspire telemetry while removing shell startup and synchronous upload waits. - Both hook and uploader modes run through `AgentTelemetryCommand` and normal command dispatch. `InitializeTelemetryOnStartup` defaults to true; the agent command defers provider creation and enrichment until an eligible event exists. Existing first-run and generic invocation-span rules are preserved. - Skill names and reference paths come from the embedded bundle's `skill-manifest.json`, read in memory with the existing manifest types and source-generated serializer. The shipped inventory preserves all 7 skills and 33 references. MCP tool names still come from the embedded canonical hook because the manifest does not contain a tool inventory. - Hook environment-variable reads use injected `IEnvironment`; hook tests run in-process without changing global environment state. A documented setting bounds input before parsing. - Eligible telemetry is persisted through Azure Monitor Exporter's existing disk-backed storage. An independent CLI uploader keeps its existing batching/retry machinery alive until the backlog drains. - Legacy Aspire registrations migrate idempotently without removing unrelated user hooks. The latest main merge preserves shell completions and the v0.0.3 skills bundle. Fixes #20329 Closes #20042 ### Coordinated OpenTelemetry upgrade The committed upgrade supersedes closed draft #20042 and consistently uses the newest releases published at least seven days before September 23, 2026: | Packages | Version | NuGet publication date (UTC) | | --- | --- | --- | | Console, InMemory, OTLP exporters; Extensions.Hosting | 1.18.0 | August 21 | | AspNetCore, Http, Runtime, SqlClient instrumentation | 1.18.0 | August 21 | | GrpcNetClient instrumentation | 1.18.0-beta.1 | August 21 | | Azure Monitor Exporter | 1.9.0 | September 5 | The 1.19.x releases were too recent for that age requirement and are not the target. The GrpcNetClient approved-feed import [succeeded in run 3085688](https://dev.azure.com/dnceng/internal/_build/results?buildId=3085688), and full solution restore succeeded against configured feeds. No quarantine was bypassed. Existing Blazor playground-specific overrides from #20339 are unchanged. Seq's generated configuration schema was refreshed for the added OTLP properties. ### Breaking changes OpenTelemetry 1.18 reduces the default maximum serialized OTLP request from 128 MiB to 64 MiB. Oversized batches are dropped. Consumers relying on the previous limit can configure: ```csharp builder.Services.Configure<OpenTelemetry.Exporter.OtlpExporterOptions>(options => { options.MaxRequestSizeBytes = 128 * 1024 * 1024; }); ``` The default maximum OTLP response size is 4 MiB. Generated ServiceDefaults inherit updated versions; existing customer projects are not rewritten. Ordinary CLI shutdown behavior is explicitly preserved despite the Azure Monitor upgrade. ### User-facing usage After installing the updated CLI, refresh agent configuration: ```shell aspire agent init ``` Claude retains `matcher: "*"`; Copilot retains unfiltered `postToolUse`. Both directly execute `aspire agent telemetry --hook` without PowerShell/Bash. Compatibility scripts are taken unchanged from the canonical bundle. `ASPIRE_AGENT_TELEMETRY_MAX_PAYLOAD_CHARACTERS` configures the native input bound: default 65,536 UTF-16 characters, range 1–1,048,576. Oversized input is drained without retention; invalid values produce a diagnostic without breaking the agent. ### Validation - Review refactor: 370 tests passed, one Linux-only skip, covering startup/completions, normal command routing, deferred provider/enrichment initialization, opt-out, all three event categories, and existing telemetry behavior. - Manifest change: 137 focused tests passed, including archive/JSON validation, canonical reporting-set parity, hook classification, and skills bundle regressions. - Final Windows x64 Native AOT publish passed after the manifest change. - The real cross-process lease-expiry recovery test is now marked `[OuterloopTest]`; fast persistence and uploader-lifecycle coverage remains in regular CI. The real recovery scenario passed before this scheduling-only change. - Coordinated dependency upgrade: full solution restore, Hosting/template builds, generated ServiceDefaults/MAUI version verification, and 21 Seq tests across .NET 8/9/10 passed. Seq stabilization packaging passed. Restore reported existing unrelated vulnerability advisories. - Real Copilot CLI 1.0.87-0, isolated COPILOT_HOME: `postToolUse` with `exec`/`args` ran its recorder after a `view` call. - Performance trade-off: normal command dispatch measured 145.4 ms median and 210.7 ms p95 for unrelated native hooks over 25 local Windows launches; the old PowerShell sample was approximately 337–460 ms. The earlier pre-host shortcut measured 52.3 ms median but was removed in response to review. These are direct-process samples, not a zero-cost guarantee. - Linux/macOS runtime performance was not tested locally. ### Security considerations The hook processes bounded untrusted JSON and launches an independent uploader. Catalog inputs come from embedded release-verified resources, not mutable user-installed skills/scripts. Only manifest-listed `references/` files are reference events; evals and scripts are excluded. No new listener, ingestion endpoint, raw-payload storage, or telemetry category is introduced. Direct argument vectors avoid shell interpretation. Existing exporter storage and process-isolation helpers are reused. Security review should cover classification parity, configuration ownership, and detached-process lifetime. Delivery remains subject to disk failures, exporter limits, retention, and permanent ingestion errors. Interrupted uploads may stay leased for several minutes; at-least-once delivery permits duplicates. Environment opt-out applies at process launch, not retroactively to running processes. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: David Pine <[email protected]> Co-authored-by: Copilot App <[email protected]> Co-authored-by: James Newton-King <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BackgroundExportHandlerworkaround and its resilience dependencyOpenTelemetryBuilder.WithLogging, matching the OpenTelemetry 1.19 APIThe package updates are scoped to the two playground solution graphs so this change is independent of the broader repository-wide OpenTelemetry update in #20042.
Testing
dotnet build playground\BlazorHosted\BlazorHosted.slnx --no-restoredotnet build playground\BlazorStandalone\BlazorStandalone.slnx --no-restoredotnet test --project tests\Aspire.Playground.Tests\Aspire.Playground.Tests.csproj --no-launch-profile -- --filter-method "*.HostedBlazorWasm_ServesAppAndWeatherApi" --filter-method "*.StandaloneBlazorWasm_GatewayServesAppAndWeatherApi" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" --hangdump --hangdump-timeout 10maspire start --isolatedand verified in a real browser that the weather page rendered and traces, logs, and metrics each exported through the OTLP proxy with HTTP 200