Skip to content

fix(cli): configure Vercel AI SDK instrumentation in Auto tracing setup - #397

Merged
fran3cc merged 1 commit into
respanai:mainfrom
Nightingalelyy:fix/cli-vercel-instrumentation-onboarding
Aug 26, 2026
Merged

fix(cli): configure Vercel AI SDK instrumentation in Auto tracing setup#397
fran3cc merged 1 commit into
respanai:mainfrom
Nightingalelyy:fix/cli-vercel-instrumentation-onboarding

Conversation

@Nightingalelyy

Copy link
Copy Markdown
Contributor

Problem

respan setup tracing delegates project changes to the bundled Respan skill. Its Auto path previously prohibited every framework instrumentor. Because Vercel AI SDK instrumentation is intentionally explicit-only, a core-only new Respan() setup left direct ai calls uninstrumented.

Fix

  • Detect direct Vercel AI SDK usage and configure @respan/instrumentation-vercel.
  • Install @ai-sdk/otel for AI SDK 7 and enable the version-appropriate per-operation telemetry option.
  • Preserve existing Respan instances, user-owned telemetry registration, Next.js server placement, and higher-level ownership precedence such as Eve.
  • Regenerate the CLI-embedded skill, synchronize the Claude/Cursor mirrors, and add an Auto-path regression test.

Vercel remains disabled in runtime auto-discovery by design: its framework-level spans can overlap provider instrumentation. The CLI now adds it explicitly for direct ai usage without broadening facade auto-discovery or introducing duplicate spans.

Regenerating the mirrors also reconciles their pre-existing drift from the canonical direct-LLM support table.

Verification

  • cd javascript-sdks/respan-cli && npm test — 2/2 passed
  • cd javascript-sdks/instrumentations/respan-instrumentation-vercel && npm test — 47/47 passed
  • python3 scripts/release_inventory.py --validate — passed
  • python3 scripts/release_intents.py validate — passed
  • Local npm pack smoke — extracted package contains the complete Vercel Auto setup
  • Bundle/source and Claude/Cursor mirrors match
  • No-network AI SDK 7.0.58 + @ai-sdk/otel 1.0.0 generateText smoke — exported the canonical agent → task → LLM hierarchy with prompt, completion, provider, model, and token fields; no raw ai.* fields remained
  • git diff --check — passed

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

Copy link
Copy Markdown
Contributor Author

Related work

PR #396 changes the same Auto-mode provider-list sentence and generated skill copies. This PR intentionally preserves Vercel as an explicit-only Auto exception, while #396 corrects the per-language direct-provider list. Whichever PR merges second should rebase, regenerate all skill copies, and retain both changes so neither wording overwrites the other.

@fran3cc
fran3cc merged commit 5d5f185 into respanai:main Aug 26, 2026
3 checks passed
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