diff --git a/weave/guides/integrations/vercel_ai_sdk.mdx b/weave/guides/integrations/vercel_ai_sdk.mdx index c6029533c7..e0401bdb71 100644 --- a/weave/guides/integrations/vercel_ai_sdk.mdx +++ b/weave/guides/integrations/vercel_ai_sdk.mdx @@ -39,7 +39,7 @@ Next.js applications use an `instrumentation.ts` file to set up OTel. This file To integrate Weave with Vercel's OTel functionality, create an `instrumentation.ts` file in your project root and add the following code to it, updating the `resourceFromAttributes()` function with your team and project names: -```typescript twoslash instrumentation.ts lines {17-19} +```typescript twoslash lines {17-19} title="instrumentation.ts" // @noErrors import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base"; @@ -74,7 +74,7 @@ This creates an OTLP exporter configured to send trace data to Weave's OTel endp After you've added the instrumentation, use Vercel's `experimental_telemetry` option on any AI SDK function call to emit OTel spans: -```typescript twoslash route.ts lines {10} +```typescript twoslash lines {10} title="route.ts" // @noErrors import { openai } from "@ai-sdk/openai"; import { generateText } from "ai";