---
title: "Finding Slow Tool Calls in Vercel AI SDK v7 Telemetry"
description: "When an agent takes ten seconds to respond, you need to know why. I used the new OpenTelemetry support in Vercel AI SDK v7 to track down a slow API call."
image: "https://foundrysoft.co/api/og?type=article&title=Finding+Slow+Tool+Calls+in+Vercel+AI+SDK+v7+Telemetry&cat=AI+Engineering&rt=6+min+read&au=Varun+Raj+Manoharan&dt=2026-07-05"
url: "https://foundrysoft.co/blog/vercel-ai-sdk-v7-telemetry-tracing"
---

AI Engineering 2026-07-05 6 min read

# Finding Slow Tool Calls in Vercel AI SDK v7 Telemetry

When an agent takes ten seconds to respond, you need to know why. I used the new OpenTelemetry support in Vercel AI SDK v7 to track down a slow API call.

![Varun Raj Manoharan](https://foundrysoft.co/images/about/founder.webp)

Varun Raj Manoharan

Vercel AI SDK v7 Observability OpenTelemetry

A lot of AI demos look incredibly fast until you run them in production. My weather-checking agent worked perfectly locally, but users complained it was freezing for ten seconds before typing a response.

Before Vercel AI SDK v7, debugging latency meant littering my code with `console.time()`. The new `@ai-sdk/otel` package fixes this by hooking directly into Node.js tracing channels.

### Wiring up OpenTelemetry

You have to configure an OpenTelemetry provider first. I exported my traces to a local Jaeger instance to visualize them. The SDK handles the rest automatically once you import the instrumentation module.

TypeScript

Copy

```typescript
// instrumentation.ts
import { registerOTel } from '@vercel/otel';
import { AISDKExporter } from '@ai-sdk/otel';

export function register() {
  registerOTel({
    serviceName: 'weather-agent',
    traceExporter: new AISDKExporter(),
  });
}
```

TypeScript

Copy

```typescript
// agent.ts
import { streamText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { z } from 'zod';

export async function POST(req: Request) {
  return streamText({
    model: openai('gpt-4o'),
    prompt: 'What is the weather in London?',
    tools: {
      getWeather: {
        description: 'Get current weather',
        parameters: z.object({ city: z.string() }),
        execute: async ({ city }) => {
          // This API call was the culprit
          const res = await fetch(`https://api.slow-weather.com/v1/${city}`);
          return res.json();
        },
      },
    },
  });
}
```

### Reading the Traces

When I checked the Jaeger dashboard, the problem was obvious. The trace showed the initial LLM call took 800 milliseconds. Then there was a massive eight-second block labeled `tool-execution: getWeather`. The final LLM call to format the response took another 600 milliseconds.

The model was not slow. The external weather API I was using had terrible latency.

The v7 observability features give you a granular breakdown of every step: how long the model thought, how long the tool ran, and how long the stream took to close. If you are building agents that rely on third-party APIs, this level of tracing is not optional. You have to know what is actually slowing you down.

#### Related reading

[Teaching an Agent Our Client Reporting Playbook with Vercel AI SDK v7 Skills

Our monthly client reports followed a 40-line prompt nobody dared touch. I moved the whole playbook into an uploaded skill using the new uploadSkill API in Vercel AI SDK v7.

Vercel AI SDK v7

](https://foundrysoft.co/blog/vercel-ai-sdk-v7-agent-skills)[Building a Realtime Voice Support Agent with Vercel AI SDK v7

Voice agents used to mean marrying one provider's WebSocket event format. I used the new experimental realtime API in Vercel AI SDK v7 to build an order-status voice agent I can move between providers.

Vercel AI SDK v7

](https://foundrysoft.co/blog/vercel-ai-sdk-v7-realtime-voice-agent)[Letting an Agent Run Shell Commands Safely with Vercel AI SDK v7 Sandboxes

I built a dependency-audit agent that runs npm commands on real projects. The new experimental sandbox support in Vercel AI SDK v7 is what made me comfortable shipping it.

Vercel AI SDK v7

](https://foundrysoft.co/blog/vercel-ai-sdk-v7-sandboxed-command-execution)

#### Next Article

[

The ROI of AI in 2026: Stop Building Demos

](https://foundrysoft.co/blog/roi-of-ai-2026-beyond-hype)

Available for new projects

## Let's build something great.

Have a project in mind? We are an elite software and AI development studio ready to bring your ideas to production. Let's talk about your roadmap.

Start a Project [See our work](https://foundrysoft.co/work)

```json
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "FoundrySoft",
  "url": "https://foundrysoft.co",
  "logo": "https://foundrysoft.co/logo.svg",
  "description": "FoundrySoft builds production-grade software and AI systems for US companies, from an India-based team of senior engineers.",
  "sameAs": [
    "https://github.com/foundrysofthq",
    "https://www.linkedin.com/company/foundrysoft",
    "https://www.instagram.com/foundrysoft/"
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "FoundrySoft",
  "url": "https://foundrysoft.co"
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "Finding Slow Tool Calls in Vercel AI SDK v7 Telemetry",
  "description": "When an agent takes ten seconds to respond, you need to know why. I used the new OpenTelemetry support in Vercel AI SDK v7 to track down a slow API call.",
  "url": "https://foundrysoft.co/blog/vercel-ai-sdk-v7-telemetry-tracing",
  "mainEntityOfPage": "https://foundrysoft.co/blog/vercel-ai-sdk-v7-telemetry-tracing",
  "image": [
    "https://foundrysoft.co/images/blog/vercel-ai-sdk-v7-telemetry.jpg"
  ],
  "datePublished": "2026-07-05",
  "dateModified": "2026-07-05",
  "keywords": "Vercel, AI, SDK v7, Observability, OpenTelemetry",
  "author": {
    "@type": "Person",
    "name": "Varun Raj Manoharan"
  },
  "publisher": {
    "@type": "Organization",
    "name": "FoundrySoft",
    "logo": {
      "@type": "ImageObject",
      "url": "https://foundrysoft.co/logo.svg"
    }
  }
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://foundrysoft.co/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Blog",
      "item": "https://foundrysoft.co/blog"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Finding Slow Tool Calls in Vercel AI SDK v7 Telemetry",
      "item": "https://foundrysoft.co/blog/vercel-ai-sdk-v7-telemetry-tracing"
    }
  ]
}
```
