Skip to content

feat(devtools): add new devtools integration for telemetry#14207

Merged
aayush-kapoor merged 26 commits intomainfrom
aayush/devtools-telemetry
Apr 10, 2026
Merged

feat(devtools): add new devtools integration for telemetry#14207
aayush-kapoor merged 26 commits intomainfrom
aayush/devtools-telemetry

Conversation

@aayush-kapoor
Copy link
Copy Markdown
Collaborator

@aayush-kapoor aayush-kapoor commented Apr 7, 2026

Background

our devtools setup currently uses middleware to extract event info

this needed to change since we now expose all the events that will be needed by devtools to initialise the spans

replacement for #12868

Summary

  • create new devToolsIntegration() that extends on the telemetry integration api
  • add a trace/span viewer that properly maps each step

Manual Verification

verified by running the example examples/ai-functions/src/generate-text/anthropic/subagent-with-telemetry.ts

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@tigent tigent Bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. feature New feature or request maintenance CI, internal documentation, automations, etc labels Apr 7, 2026
Comment thread packages/devtools/src/integration.ts Outdated
@lgrammel
Copy link
Copy Markdown
Collaborator

lgrammel commented Apr 8, 2026

Can we call it DevToolsTelemetry instead of DevToolsIntegration? (also worth thinking about dropping "Integration" from the other telemetry classes/interfaces)

@aayush-kapoor
Copy link
Copy Markdown
Collaborator Author

aayush-kapoor commented Apr 8, 2026

Can we call it DevToolsTelemetry instead of DevToolsIntegration? (also worth thinking about dropping "Integration" from the other telemetry classes/interfaces)

sgtm, will change in a future PR for others

aayush-kapoor added a commit that referenced this pull request Apr 10, 2026
## Background

added as work for #14207

when using the streaming functions and logging telemetry via devtools,
the raw chunks couldn't be seen in the viewer.
and that's because the event types weren't being passed through
callbacks

## Summary

dispatch content chunk types through the global onChunk so that
telemetry integrations receive the full stream.

## Manual Verification

verified as a part of #14207

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)
@aayush-kapoor aayush-kapoor marked this pull request as ready for review April 10, 2026 18:18
Copy link
Copy Markdown
Collaborator

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it locally. Love the timeline view! Just update docs please

image

@aayush-kapoor aayush-kapoor enabled auto-merge (squash) April 10, 2026 22:27
@aayush-kapoor aayush-kapoor merged commit e27ed76 into main Apr 10, 2026
17 checks passed
@aayush-kapoor aayush-kapoor deleted the aayush/devtools-telemetry branch April 10, 2026 22:28
@ghost
Copy link
Copy Markdown

ghost commented Apr 10, 2026

🚀 Published in:

Package Version
ai 7.0.0-beta.82
@ai-sdk/angular 3.0.0-beta.82
@ai-sdk/devtools 1.0.0-beta.11
@ai-sdk/langchain 3.0.0-beta.82
@ai-sdk/llamaindex 3.0.0-beta.82
@ai-sdk/otel 1.0.0-beta.28
@ai-sdk/react 4.0.0-beta.82
@ai-sdk/rsc 3.0.0-beta.83
@ai-sdk/svelte 5.0.0-beta.82
@ai-sdk/vue 4.0.0-beta.82

@aayush-kapoor aayush-kapoor linked an issue Apr 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. feature New feature or request maintenance CI, internal documentation, automations, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate devtools package to use the telemetry apis

3 participants