Skip to content

fix(tracing): tracing capability check - #2131

Merged
ben-reitz merged 2 commits into
mainfrom
fix/2087-tracing-capability-check
Aug 18, 2026
Merged

fix(tracing): tracing capability check#2131
ben-reitz merged 2 commits into
mainfrom
fix/2087-tracing-capability-check

Conversation

@ben-reitz

@ben-reitz ben-reitz commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #2087 for agents on older workerd versions that had tracing defined but did not have a startActiveSpan function.

   Old workerd                    → silently use a no-op tracer
     tracing is undefined

   Intermediate workerd           x throws an error
     tracing.enterSpan exists
     tracing.startActiveSpan does not exist

   Modern workerd                 → use native Cloudflare tracing already
     tracing.enterSpan exists
     tracing.startActiveSpan exists

This fix also handles the intermediate case where a partial tracing runtime exists.

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 90288ae

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

This PR includes changesets to release 2 packages
Name Type
agents Patch
@cloudflare/agent-think 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

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@2131

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@2131

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@2131

hono-agents

npm i https://pkg.pr.new/hono-agents@2131

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@2131

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@2131

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@2131

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@2131

commit: 90288ae

@ben-reitz
ben-reitz merged commit bf94bb2 into main Aug 18, 2026
15 checks passed
@ben-reitz
ben-reitz deleted the fix/2087-tracing-capability-check branch August 18, 2026 15:19
@github-actions github-actions Bot mentioned this pull request Aug 18, 2026
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.

createTracer fallback never engages on workerd: truthy tracing export lacks startActiveSpan (0.18.0-0.20.1)

1 participant