Skip to content

Emit OTel spans for tool calls that don't have an execute function #10498

@armans-code

Description

@armans-code

Description

Right now, tool call spans are only created if they have a defined execute function. This means that tool calls that don't have an execute function aren't picked up in tracing. Thus, the only way to tell which tool calls were picked is to manually parse + look at the ai.response.toolCalls attribute of a doGenerate/doStream span.

It'd be great if these "noop" tool calls were captured in tracing, so we know when they're called.

This is helpful for tracing the following scenarios:

Added a draft PR for proposed changes: #10499

AI SDK Version

ai: ^5.0.89

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions