Skip to content

[miniflare] Hide favicon and DevTools noise from dev logs and Observability - #14956

Open
nickpatt wants to merge 8 commits into
cloudflare:mainfrom
nickpatt:local-explorer-hide-internal-noise
Open

[miniflare] Hide favicon and DevTools noise from dev logs and Observability#14956
nickpatt wants to merge 8 commits into
cloudflare:mainfrom
nickpatt:local-explorer-hide-internal-noise

Conversation

@nickpatt

@nickpatt nickpatt commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Dev output is noisy with requests you never made and internals you don't own. This trims that down in three places:

  • Request logwrangler dev no longer logs the requests a browser fires on its own: /favicon.ico and Chrome DevTools' /.well-known/appspecific/com.chrome.devtools.json probe. (Vite dev runs miniflare with request logging off, so this is a wrangler dev change only.)
  • Traces — the same browser noise is hidden, and so are Vite's own internal requests (__vite_plugin_cloudflare_init__ / _get_export_types__). In a real Vite session those accounted for 8 of 11 rows in the list.
  • Events — same browser-noise filtering, plus Vite's module-runner plumbing (wrapper workers and RPC dispatch, including the stray [vite] hot updated HMR log), which is now hidden by default instead of sitting behind a UI toggle.

Notes on the filtering rules

Getting this right matters more than getting it aggressive — hiding a user's real request or log line is far worse than leaving some noise on screen. So:

  • Noise paths are matched exactly, on the URL's path component, mirroring miniflare's url.pathname check. A suffix match would also have caught an app's own /static/favicon.ico and remote CDN favicons.
  • Noise is judged on a trace's root request, not on whichever span emitted a log, so a user's outbound fetch to some CDN's /favicon.ico doesn't lose its logs.
  • Vite's internal requests are matched by path, not by the wrapper-service marker. Vite routes every request through its router worker, so marker-matching a root span would blank out the user's real traffic along with the plumbing.
  • The executeCallback shape rule only applies inside a confirmed Vite trace (one that also contains a wrapper span), mirroring the existing safety rule in stripDevRunnerSpans — a wrangler dev user may legitimately have their own RPC method by that name.
  • Error-level logs are never hidden, so a failure in the plumbing still surfaces.
  • Filtering happens in the SQL WHERE clause, so LIMIT counts only rows that will actually be shown.

Verified against real capture stores from both a vite dev and a wrangler dev session: the Vite trace list drops 11 → 3 (exactly the three real requests), and the wrangler dev list is unaffected by the Vite rules.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this is a local dev-experience refinement (reducing log/UI noise) with no new public API, binding, or config surface.

…bility

Stop logging the requests browsers make on their own (/favicon.ico and the
Chrome DevTools probe) in dev, and apply the same filtering in the Local
Explorer's Observability views. Vite's internal module-runner plumbing is now
hidden by default there too, instead of behind a toggle.
@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 721b162

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
miniflare Patch
wrangler Patch
@cloudflare/deploy-helpers Patch
@cloudflare/pages-shared Patch
@cloudflare/remote-bindings Patch
@cloudflare/runtime-types Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Jul 31, 2026
@workers-devprod
workers-devprod requested review from a team and edmundhung and removed request for a team July 31, 2026 19:18
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/hide-internal-dev-noise.md: [@cloudflare/wrangler]
  • packages/local-explorer-ui/src/tests/observability/observability.test.ts: [@cloudflare/wrangler]
  • packages/local-explorer-ui/src/routes/observability/index.tsx: [@cloudflare/wrangler]
  • packages/local-explorer-ui/src/utils/observability.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/workers/core/entry.worker.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/index.spec.ts: [@cloudflare/wrangler]

@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14956

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@14956

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@14956

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14956

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14956

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14956

miniflare

npm i https://pkg.pr.new/miniflare@14956

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@14956

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14956

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14956

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14956

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14956

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14956

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14956

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14956

wrangler

npm i https://pkg.pr.new/wrangler@14956

commit: 721b162

devin-ai-integration[bot]

This comment was marked as resolved.

…ter in SQL

The executeCallback shape rule was applied unconditionally, so a plain
`wrangler dev` user with their own RPC method of that name would have had
their logs silently dropped. It now only applies to traces that also contain a
Vite wrapper span, matching the safety rule in stripDevRunnerSpans.

Both predicates moved into the SQL WHERE clause so LIMIT counts only rows the
user will see, instead of filtering a full page down to far fewer rows.
devin-ai-integration[bot]

This comment was marked as resolved.

nickpatt and others added 2 commits July 31, 2026 15:14
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread .changeset/hide-internal-dev-noise.md Outdated

`wrangler dev` and the Vite plugin no longer log requests the browser makes on its own — `/favicon.ico` and Chrome DevTools' `/.well-known/appspecific/com.chrome.devtools.json` probe — so the request log reflects your app's traffic.

The Local Explorer's Observability views apply the same filtering: favicon and DevTools-probe traces/logs are always hidden, and Vite's internal module-runner plumbing (its router/asset wrapper workers and RPC dispatch) is hidden by default rather than behind a toggle. Set `VITE_LOCAL_EXPLORER_SHOW_VITE_INTERNALS=true` when building the UI to reveal it for debugging.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changelog entry tells users to rebuild an internal UI, which they cannot do

The changelog entry instructs readers to set a build-time UI variable (VITE_LOCAL_EXPLORER_SHOW_VITE_INTERNALS=true at .changeset/hide-internal-dev-noise.md:10) even though the Local Explorer UI ships prebuilt inside miniflare, so the advice only applies to repository maintainers, not the tool's users.
Impact: Released changelog contains an instruction that end users cannot act on.

Repository changeset rule

REVIEW.md states: "Changesets should target users of the tools (e.g. Wrangler users) rather than maintainers. Avoid including implementation details." The escape hatch is a Vite build-time env var read at packages/local-explorer-ui/src/utils/observability.ts:179-180; the UI is built and bundled during release, so a Wrangler/miniflare consumer has no way to rebuild it with that flag.

Prompt for agents
The changeset's last sentence documents a maintainer-only build-time escape hatch (VITE_LOCAL_EXPLORER_SHOW_VITE_INTERNALS) that users of wrangler/miniflare cannot use, since the Local Explorer UI is shipped prebuilt. REVIEW.md requires changesets to target users of the tools rather than maintainers. Reword the changeset to describe only the user-facing effect (favicon/DevTools noise and Vite internals are hidden from dev logs and the Observability views) and drop the build-flag instruction.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +398 to +403
// Requests the browser makes on its own (favicon, Chrome DevTools probe), not
// the developer. Kept out of the request log to cut noise.
const LOG_NOISE_PATHS = new Set([
"/favicon.ico",
"/.well-known/appspecific/com.chrome.devtools.json",
]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 The same list of browser-noise request paths is now hardcoded in two packages

The favicon and Chrome DevTools probe paths are duplicated as a new constant (LOG_NOISE_PATHS at packages/miniflare/src/workers/core/entry.worker.ts:400-403) instead of being shared with the identical list used by the Observability views, so the two copies can silently drift apart.
Impact: A future change to one list will filter noise in the request log but not in the Observability views (or vice versa).

Where the duplicate lives and the repo rule

AGENTS.md lists "Duplicating types/constants across packages → export from the owning package and import where needed" as an explicit anti-pattern. The same two paths are declared as HIDDEN_NOISE_PATHS in packages/local-explorer-ui/src/utils/observability.ts:357-360, and both copies are meant to describe the same set of browser-generated requests.

Prompt for agents
The list of browser-generated "noise" request paths (/favicon.ico and /.well-known/appspecific/com.chrome.devtools.json) now exists twice: LOG_NOISE_PATHS in packages/miniflare/src/workers/core/entry.worker.ts and HIDDEN_NOISE_PATHS in packages/local-explorer-ui/src/utils/observability.ts. AGENTS.md forbids duplicating constants across packages. Consider defining the list once in a module both can import (e.g. a shared constants file in miniflare that the local-explorer UI can import, similar to how other shared markers are handled) so the two filters cannot drift.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

nickpatt added 2 commits July 31, 2026 16:12
…oot request

The trailing-wildcard LIKE matched any URL ending in the path, so an app's own
/static/favicon.ico and remote CDN favicons were treated as browser noise, and
it disagreed with miniflare's exact url.pathname rule. Extract and compare the
path instead.

The logs view tested whichever span emitted the log, so a user's outbound fetch
to a CDN favicon would have lost its logs. It now tests the trace's root span,
so noise is judged on the incoming request.
… list

A vite dev session's trace list was almost entirely plumbing: the module
runner's __vite_plugin_cloudflare_init__ and _get_export_types__ requests
accounted for 8 of 11 traces. They're matched by request path rather than by the
wrapper-service marker, because Vite routes every request through its router
worker — marker-matching a root span would have hidden the user's real traffic
too.

Also corrects the changeset, which advertised a build-time flag that only
applies to maintainers (the UI ships prebuilt) and credited the Vite plugin with
a request-log change it doesn't get (vite dev runs with logRequests off), and
cross-references the noise-path list that miniflare and the UI each need their
own copy of.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants