Skip to content

Add trace viewer span markers for hooks and attributes #2452

Open
mitul-s wants to merge 3 commits into
mainfrom
ms/trace-span-markers
Open

Add trace viewer span markers for hooks and attributes #2452
mitul-s wants to merge 3 commits into
mainfrom
ms/trace-span-markers

Conversation

@mitul-s

@mitul-s mitul-s commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Test by visiting a Workflow with a hook, and a workflow with attributes being set.

CleanShot.2026-06-16.at.12.06.25.mp4

mitul-s and others added 2 commits June 16, 2026 12:03
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jun 16, 2026 5:30pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jun 16, 2026 5:30pm
example-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-astro-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-express-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-fastify-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-hono-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-nitro-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workbench-vite-workflow Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jun 16, 2026 5:30pm
workflow-swc-playground Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workflow-tarballs Ready Ready Preview, Comment Jun 16, 2026 5:30pm
workflow-web Ready Ready Preview, Comment Jun 16, 2026 5:30pm

@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 93294dc

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

This PR includes changesets to release 16 packages
Name Type
@workflow/web-shared Minor
@workflow/web Minor
@workflow/cli Patch
@workflow/nitro Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/vitest Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite 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

@karthikscale3 karthikscale3 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.

Approving because this is directionally good and the focused marker/segment tests pass, but please address the two inline UI regressions before merging: tiny-span attr_set markers can disappear, and marker tooltips/labels no longer identify the event kind.

const baseMarkers = useMemo(() => computeSpanMarkers(span), [span]);
const markers = useMemo(
() =>
geometry.mode.kind === 'full'

@karthikscale3 karthikscale3 Jun 16, 2026

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.

Small UI regression risk: because markers are only projected/rendered when geometry.mode.kind is full, any attr_set marker on a short/tiny span disappears. The old AttrSetMarkers path projected by viewport time and still showed those diamonds even when the bar collapsed to tiny/arrow. Can we keep a visible marker/indicator for tiny spans too?

className="pointer-events-auto absolute top-0 bottom-0 z-10 flex w-8 -translate-x-1/2 items-center justify-center"
style={{ left: `clamp(8px, ${m.leftPct}%, calc(100% - 8px))` }}
>
<TimestampTooltip date={m.timeMs}>

@karthikscale3 karthikscale3 Jun 16, 2026

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.

Could we preserve the marker kind and include it in the tooltip/aria label? Right now SpanMarker only carries timeMs, so hook_received and attr_set both render as the same timestamp-only tick. That regresses the previous Attributes set affordance and makes hook resumptions vs attribute writes indistinguishable.

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.

2 participants