[local-explorer-ui] Improve observability logs, id search, and event-to-trace navigation - #14941
Open
nickpatt wants to merge 10 commits into
Open
[local-explorer-ui] Improve observability logs, id search, and event-to-trace navigation#14941nickpatt wants to merge 10 commits into
nickpatt wants to merge 10 commits into
Conversation
…to-trace navigation
🦋 Changeset detectedLatest commit: 112e524 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
workers-devprod
requested review from
a team and
penalosa
and removed request for
a team
July 30, 2026 20:22
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
… label the View trace button
…d add a changeset The Events "View trace" button now carries the event's span_id, and the Traces view resolves it to the invocation row whose spans actually contain that span (findInvocationRoot), instead of always landing on the first row sharing the trace_id. Row element ids are keyed by (trace_id, root_span_id) so they stay unique across a multi-invocation trace.
NuroDev
requested changes
Jul 31, 2026
…, parser edge-case tests - Changeset is a minor (adds id search + View trace), not a patch; backtick console.log. - Render a muted "(no message)" placeholder for empty logs to avoid layout shift (Events + InvocationLogs). - Add trace:/span: parser edge cases: valueless tokens fall back to free text, id aliases, and id-lookup alongside a clause. - Summarise the deep-link effect with a one-line comment.
…search params Switch the Events "View trace" button to a router-aware link (createLink around Kumo's LinkButton) so it supports open-in-new-tab / copy-link, while the router keeps typed search params. Added a validateSearch to the /observability route (worker/trace/span) so the link and deep-link reads are typed (drops the casts). The link passes an explicit search object (worker + trace + span) instead of spreading the Events view's params, and the onClick now only stopPropagation on the clickable row.
The reveal effect only worked if the trace was already in the default trace-list window (100 rows, no id filter), but events go 200 deep, so a deep-linked trace could sit permanently outside that window and the View trace button would silently do nothing. Seed the search with `trace:<id>` when the deep link is present so the specific row is fetched via the traceId filter; if it still doesn't come back the trace is gone and the existing empty state (with the visible trace: filter) explains that.
…search Free-text search matched trace/span ids with %q% (substring anywhere), so on hex ids any short term like "de" matched almost every record and effectively disabled filtering. Match ids by prefix (q%), consistent with the trace:/span: filters, while keeping substring matching for names, messages, service, and attributes.
… from the URL The ?trace=&span= params were consumed but left in the URL. Because the view switcher preserves search params and the Traces route remounts on each visit (resetting the applied/seeded refs), the stale trace param re-seeded the trace:<id> query and re-expanded the row on every return, hiding other traces even after the user cleared the search. Capture the deep link once at mount and strip trace/span from the URL (replace navigation, keeping worker), so it only applies once.
…ability page titles The sidebar already switches between the Traces and Events views, so the duplicate dropdown in each page title added no value. Replace it with a plain title and remove the now-unused ObservabilityViewSwitcher component.
nickpatt
force-pushed
the
local-explorer-observability-ui-fixes
branch
from
July 31, 2026 20:10
eb93628 to
73b824f
Compare
NuroDev
approved these changes
Aug 3, 2026
NuroDev
enabled auto-merge (squash)
August 3, 2026 16:59
workers-devprod
approved these changes
Aug 3, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
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.
Four fixes to the Local Explorer Observability views (Traces / Events).
1. Readable log messages
console.logis captured as a JSON-encoded array of its arguments, so multi-arg logs rendered as a raw array, e.g.["request failed:","D1_ERROR: …"].formatLogMessagenow renders the array the way the console would — strings verbatim, everything else as JSON, space-joined (request failed: D1_ERROR: …). Both log renderers (the Events list and the inline invocation logs) now share this one function.2. Search by id
The Traces and Events search bars couldn't look up a span/trace id. Added
trace:<id>/span:<id>query terms (withtraceid/trace_idaliases), and free-text search now also matches trace/span ids — so pasting a bare id just finds it. Prefix matching means the truncated ids shown in the list work too. Documented in the query-syntax popover.3. "View trace" from an event
Each event row with a
span_idnow has a button that jumps to the Traces view, auto-expands that event's trace waterfall, and scrolls it into view (via a?trace=<id>deep link).4. Drop the redundant page-title view switcher
The sidebar already switches between the Traces and Events views, so the extra dropdown in each page title was duplicative. Replaced it with a plain title and removed the now-unused
ObservabilityViewSwitchercomponent.