Repository navigation
docs(kanban): spec task 121 WASM store telemetry export to DevTools - #650
Merged
StevenTCramer merged 7 commits intoOct 16, 2026
Merged
StevenTCramer merged 7 commits into
StevenTCramer merged 7 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QYpqCSgnvvLRpXrMKxu5ED
After the first interactive render, store activity lives in the browser. The server exporter cannot post from that runtime, the inspector had no CORS policy, and the endpoint variable never reaches the page. A Development-only browser exporter reuses the existing ingest document, the host tells the page where the inspector is, and the inspector accepts only configured origins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The packaged tools folder has no launch profile, so Aspire started the inspector as Production and the browser preflight never saw CORS. Run mode sets Development, allow headers stay on the ingest route, discovery keeps a path base, and each inspected app adds its origins. The sample also serves the Blazor framework script, so the WASM counter can post a wasm row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StevenTCramer
deleted the
task/121-export-blazor-webassembly-store-telemetry-to-the-s
branch
October 16, 2026 12:29
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
TimeWarp.State.DevTools.WasmpostsTimeWarp.Stateactivities from the browser to the existing ingest document. The server stampstimewarp.state.runtime=serverwhen that tag is absent. The browser exporter stampswasm. The inspector log copies that field onto the row and shows srv or wasm.The browser learns the origin from
TimeWarp:State:DevTools:Endpoint, thenTIMEWARP_STATE_DEVTOOLS_ENDPOINT, thenGET /_timewarp/state-devtools(MapTimeWarpStateDevToolsClientConfig, Development only).WithTimeWarpStateDevToolssetsTIMEWARP_STATE_DEVTOOLS_CORS_ORIGINSon the inspector from the inspected app's http and https endpoints. CORS is registered only in Development and only when that list has an absolute http(s) origin.Packages are
12.0.0-beta.15. A published app keeps the assembly out with a Debug-onlyPackageReferenceand#if DEBUGaround the call. The telemetry sample keeps the reference so/counter-wasmstays visible../bin/dev buildexited 0 with 0 compiler errors. The log still prints pre-existing NuGet warnings (NU1510, NU1902) that this change did not add../bin/dev testexited 0, including DevTools (89) and DevTools isolation (4). The telemetry sample server, which hosts the WASM client, builds with 0 warnings.Review round 1 is addressed on this branch. Run mode sets
ASPNETCORE_ENVIRONMENT=Developmenton the packaged inspector, so ingest CORS is registered under Aspire. Allow headers are onPOST /ingest/spansonly, and the private-network header is added only after the policy has allowed the origin. Discovery joins a relative path onto the host base, so a path base is kept. EachWithTimeWarpStateDevToolsadds origins to one callback.FlushTaskis public becauseInternalsVisibleTowould also expose the internal copies of the ingest document and collide with the public exporter types. Dispose still does not wait on it. The release note names theMicrosoft.AspNetCore.Appshared framework.timewarp-state.slnxlists Debug and Release again.The sample server was only calling
UseStaticFiles, which serveswwwrootand not the framework manifest./counter-wasmthen 404s_framework/blazor.web.jsand the WASM counter never starts. The host now callsUseStaticWebAssetsandMapStaticAssets, the same pair the inspector uses.dotnet test tests/timewarp-state-devtools-tests/timewarp-state-devtools-tests.csprojpassed 94, failed 0../bin/dev testexited 0../bin/dev buildexited 0 with 0 errors. Warnings in that log are pre-existing and outside the DevTools projects and sample 04 (nullable warnings in clone tests, TW0007, RS0030, plus NU1510 and NU1902).Test plan
Smoke:
dotnet run --project samples/04-telemetry/apphost/sample-04-apphost.csproj. Open the sample athttp://localhost:5086/counter-wasm(that origin is the one Aspire puts inTIMEWARP_STATE_DEVTOOLS_CORS_ORIGINS). Click Click me. Open the inspector URL fromGET http://localhost:5086/_timewarp/state-devtools.Expect: the count increases by 5. The inspector shows
WasmCounterStatewith a wasm badge, includingIncrementCountActionSet.Action.OPTIONS /ingest/spansfromhttp://localhost:5086returns 204 withAccess-Control-Allow-Origin: http://localhost:5086.GET /on the inspector does not send that header.Observed on 2026-10-16: the count went from 3 to 8. The inspector listed
live wasm init WasmCounterStateandlive wasm IncrementCountActionSet.Action WasmCounterState. The preflight returned 204.GET /had no allow-origin header.Kanban task 121
Session: 3911642