Skip to content

docs(research): plan traceWorkflowSpans for authored instrumentation - #1815

Draft
cmpadden wants to merge 1 commit into
mainfrom
trace-workflow-spans-option
Draft

docs(research): plan traceWorkflowSpans for authored instrumentation#1815
cmpadden wants to merge 1 commit into
mainfrom
trace-workflow-spans-option

Conversation

@cmpadden

@cmpadden cmpadden commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Related to #1779. Investigates whether defineInstrumentation can gain a traceWorkflowSpans option and adds the research plan for it. No runtime change.

instrumentations: [] cannot suppress Workflow spans because they are created manually via trace.getTracer("workflow") in @workflow/core, @workflow/world-local, and @workflow/world-vercel. eve also cannot reuse the AgentTraceSpanProcessor trick the issue cites: an authored instrumentation.ts owns the provider and the span processors, so eve has no export-time seam. The plan proposes the one interposition point eve does have — after the authored setup returns, replace the delegate of the global ProxyTracerProvider with a wrapper that returns a no-op tracer for the workflow scope.

Two things to weigh before implementing, both covered in the document alongside the rejected alternatives: this would be the first place eve mutates a tracer provider it does not own, and in the Workflow SDK's default linked trace mode the run-origin span link lives on the span being suppressed.

Validation

  • pnpm guard:invariants (covers research frontmatter)
  • Mechanism verified with throwaway scripts against the workspace's @vercel/otel + @opentelemetry/api: the global delegate swap is visible across module copies, Workflow packages resolve their tracer lazily so the swap lands first, and the exported topology keeps its trace id and re-parents agent spans onto the nearest surviving ancestor with no dangling parents
  • No tests, docs, or changeset: this PR adds a research/ document only

Checklist

  • I linked an issue with prior discussion confirming this change is wanted
  • I ran the relevant checks from CONTRIBUTING.md
  • I added tests and documentation where relevant
  • I added a changeset if this touches the published eve package
  • DCO sign-off passes for every commit (git commit --signoff)

Signed-off-by: Colton Padden <colton.padden@vercel.com>

Co-Authored-By: Colton Padden <colton.padden@vercel.com>
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
eve-docs Ready Ready Preview Aug 7, 2026 7:43pm
eve-docs-4759 Ready Ready Preview, v0 Aug 7, 2026 7:43pm

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.

1 participant