Skip to content

feat(trace): split API requests into a separate network stream - #42073

Open
dcrousso wants to merge 1 commit into
microsoft:mainfrom
dcrousso:trace-api-network
Open

feat(trace): split API requests into a separate network stream#42073
dcrousso wants to merge 1 commit into
microsoft:mainfrom
dcrousso:trace-api-network

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

the existing .network stream mixed browser traffic with APIRequestContext traffic

record _apiRequest entries in .api.network, archive it as trace.api.network, and ingest it alongside .network

bump the trace format to 9 so older viewers reject traces that have the new stream

the existing `.network` stream mixed browser traffic with `APIRequestContext` traffic

record `_apiRequest` entries in `.api.network`, archive it as `trace.api.network`, and ingest it alongside `.network`

bump the trace format to `9` so older viewers reject traces that have the new stream
@dcrousso
dcrousso requested review from pavelfeldman and yury-s July 31, 2026 22:07

@pavelfeldman pavelfeldman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

On a high level, I expect the fetch context to have its own trace file and its own network file. No apiNetworkFile in the recording state/ no version bump. API request context is just another context with its own trace and network.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7867 passed, 1272 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

9 flaky ⚠️ [chromium-library] › library/video.spec.ts:699 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/har-websocket.spec.ts:231 › should embed websocket messages `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/browsercontext-page-event.spec.ts:160 › should work with Shift-clicking `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:189 › should show snapshots for steps `@windows-latest-node22`

51118 passed, 1188 skipped


Merge workflow run.

@jwebsite-go

Copy link
Copy Markdown

great post

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.

3 participants