[miniflare] Local dev observability (1/6): opt-in switch + core wiring#14634
Closed
nickpatt wants to merge 1 commit into
Closed
[miniflare] Local dev observability (1/6): opt-in switch + core wiring#14634nickpatt wants to merge 1 commit into
nickpatt wants to merge 1 commit into
Conversation
…lder collector) Experimental. Add the X_LOCAL_OBSERVABILITY env var (read by both wrangler and the Vite plugin — there is no CLI flag or plugin option), which is translated into a single `unsafeObservability` Miniflare option. When set, Miniflare core attaches an internal trace collector as a streaming-tail consumer of each user worker and adds the compat flags workerd needs to emit that tail — done once in core so the dev tools don't duplicate the wiring. It defaults to off while experimental. The collector is a placeholder for now (no-op tailStream); capturing spans/logs and persisting them to an internal store land in follow-up PRs.
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
Author
|
Closing — consolidating into a single PR (#14633) with the six section commits reviewed commit-by-commit, rather than sequential PRs. |
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.
First in a series of small, sequential PRs adding experimental local-dev observability to Miniflare. This one wires the plumbing; capture, storage, the read API, and the UI land in follow-up PRs (each opened once the previous merges).
This PR
Adds the
X_LOCAL_OBSERVABILITYopt-in — read by bothwrangler devand the Vite plugin, so there's no separate CLI flag or plugin option — which turns on a singleunsafeObservabilityMiniflare option. When set, Miniflare core attaches an internal trace collector as a streaming-tail consumer of each user Worker and adds the compatibility flags workerd needs to emit that tail, wired once in core so the dev tools don't duplicate it. Defaults to off while experimental.The collector is a placeholder here (no-op
tailStream); folding the tail into spans/logs and persisting them land in the following PRs.The series (for context)
Replaces the earlier monolithic exploration in #14391.
X_LOCAL_OBSERVABILITY(off by default); user-facing docs will follow when it stabilises.