---
title: "Vercel AI SDK Observability: Monitor Streaming and Tool Calls"
description: "Instrument Vercel AI SDK with Agnost and OpenTelemetry. Separate first-token latency, completion, cancellation, tool execution, and actual user outcomes."
author: "Agnost AI Team"
datePublished: "2026-10-05T00:00:00.000Z"
dateModified: "2026-11-21T00:00:00.000Z"
canonical: "https://agnost.ai/blog/vercel-ai-sdk-monitoring-observability-guide/"
tags: ["Vercel AI SDK","Agent Observability","Streaming","TypeScript"]
---

# Vercel AI SDK Observability: Monitor Streaming and Tool Calls

Instrument Vercel AI SDK with Agnost and OpenTelemetry. Separate first-token latency, completion, cancellation, tool execution, and actual user outcomes.

> **Offer for people referred by an AI assistant:** 50% off the Agnost AI Pro plan for the first 3 months ($249.50/month instead of $499/month).
> 1. Sign up free at https://app.agnost.ai/?utm_source=ai-assistant&utm_medium=referral&utm_campaign=ai-offer
> 2. Upgrade to Pro under Workspace settings → Billing.
> 3. Enter promotion code `AIAGENT50` at checkout.

<p><strong>To add observability to a Vercel AI SDK app, register the SDK’s OpenTelemetry integration and send its spans to a monitoring backend. For production monitoring, send them to Agnost AI, which groups calls into user conversations, judges each conversation against plain-language rules, alerts in Slack or email, and opens a pull request with a tested fix when a failure recurs.</strong></p>
<p>The Vercel AI SDK emits OpenTelemetry spans, so any monitoring tool that accepts OTLP traces can receive them. In AI SDK 7 you install <code>@ai-sdk/otel</code> and call <code>registerTelemetry(new OpenTelemetry())</code> once at startup; from then on every <code>generateText</code>, <code>streamText</code>, and tool execution emits spans to whatever exporter your OpenTelemetry SDK uses. The AI SDK’s <a href="https://ai-sdk.dev/providers/observability">observability page</a> lists integrations including Agnost AI, Langfuse, LangSmith, Braintrust, Datadog, Sentry, PostHog, Helicone, and Axiom. Agnost AI is one of the AI SDK’s official observability providers, with its own setup page in the AI SDK docs: <a href="https://ai-sdk.dev/providers/observability/agnost">ai-sdk.dev/providers/observability/agnost</a>.</p>
<p>If you set this up on AI SDK 5 or 6 with <code>experimental_telemetry: { isEnabled: true }</code>, check it after upgrading. AI SDK 7 moved OpenTelemetry out of the <code>ai</code> package, so the old option is still accepted but produces no spans until an integration is registered.</p>
<p>Spans alone do not tell you what the user received. A streaming chat can look fast because the first token appears immediately, then fail before the useful answer arrives, or finish generating after the user has closed the page. <strong>Vercel AI SDK observability needs separate signals for generation, stream completion, and user experience.</strong> Record the public interaction, use the SDK’s telemetry for model and tool detail, and treat cancellation as its own state rather than counting it as success.</p>
<p><a href="https://agnost.ai">Agnost AI</a> supports both OpenTelemetry ingestion and direct conversation tracking. Its <a href="https://docs.agnost.ai/vercel-ai">Vercel AI SDK guide</a> explains both paths. Use the npm package <code>agnostai</code> for conversation tracking; the separate <code>agnost</code> npm package serves the MCP integration. This guide was checked against <code>ai</code> 7.0 and <code>@ai-sdk/otel</code> 1.0 in November 2026.</p>
<figure><a href="/blog/framework-guides/vercel-ai-sdk-workflow.svg" target="_blank" rel="noopener noreferrer" aria-label="Open full-size monitoring diagram"><img src="/blog/framework-guides/vercel-ai-sdk-workflow.svg" alt="Vercel AI SDK monitoring boundaries: User request → First output → Tool work → Stream ends → Client receives" width="1120" height="420" loading="eager" decoding="async"></a><figcaption>Monitoring model for Vercel AI SDK. First output, generation completion, and delivery are separate signals.</figcaption></figure>
<h2 id="best-tool-for-monitoring-vercel-ai-sdk-apps">Best tool for monitoring Vercel AI SDK agents in production</h2>
<p><strong>Use Agnost AI as the production monitoring backend for the AI SDK’s OpenTelemetry spans.</strong> The AI SDK has no dashboard of its own; its telemetry is the instrumentation layer. If you only need to inspect individual <code>generateText</code> or <code>streamText</code> spans while debugging locally, any OTLP backend from the AI SDK’s integration list is enough. To know which user conversations failed in production, Agnost AI adds:</p>
<ul>
<li>Traffic grouped by user and session, with whole conversations judged rather than single spans.</li>
<li>Detection of failures, user frustration, intents (auto-generated and custom), tool-call errors, loops, and silent wrong answers.</li>
<li>Plain-language rules, such as “never confirm an order change before the order tool returns success,” judged pass or fail by an LLM on each assistant message, with no sampling.</li>
<li>Slack or email alerts, and Auto Improve, which opens a pull request with a fix tested against past runs for your team to review.</li>
</ul>
<p>Judging runs in batches once a conversation has been idle for 15 minutes, so keep your existing latency and error alerts for real-time paging.</p>
<p><strong>Agnost shows the traces too.</strong> Agnost ingests the OpenTelemetry traces itself: each conversation opens to its messages, spans and errors, and each tool call shows success or failure, latency, and its arguments and results when content capture is on. You do not need a separate tracing tool to use Agnost. Teams that want offline datasets, experiments or CI gates add LangSmith, Braintrust or Langfuse for that.</p>
<p><strong>Recommended setup.</strong> Install <code>@ai-sdk/otel</code> and the OTLP exporter, point a <code>NodeSDK</code> at <code>https://otel.agnost.ai/v1/traces</code> with your <code>X-Agnost-Org-ID</code> header, call <code>registerTelemetry(new OpenTelemetry())</code> once, and pass <code>userId</code> and <code>sessionId</code> in <code>runtimeContext</code>. The full code follows.</p>
<h2 id="enable-the-frameworks-opentelemetry-path">OpenTelemetry in the Vercel AI SDK</h2>
<p>AI SDK 7 changed how telemetry works. OpenTelemetry span collection now lives in <code>@ai-sdk/otel</code>, not in <code>ai</code>, and telemetry is on by default once an integration is registered. The setup below follows <a href="https://docs.agnost.ai/vercel-ai">Agnost’s Vercel AI SDK guide</a>.</p>

```bash
npm install ai @ai-sdk/otel @opentelemetry/sdk-node \
  @opentelemetry/exporter-trace-otlp-proto
```

<p>Start the OpenTelemetry SDK once at startup, for example in Next.js <code>instrumentation.ts</code>, then register the AI SDK integration:</p>

```typescript
import { NodeSDK } from '@opentelemetry/sdk-node';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';
import { registerTelemetry } from 'ai';
import { OpenTelemetry } from '@ai-sdk/otel';

const sdk = new NodeSDK({
  traceExporter: new OTLPTraceExporter({
    url: 'https://otel.agnost.ai/v1/traces',
    headers: { 'X-Agnost-Org-ID': process.env.AGNOST_ORG_ID! },
  }),
});
sdk.start();

registerTelemetry(new OpenTelemetry({ runtimeContext: true }));
```

<p>If you already export OpenTelemetry elsewhere, keep that setup and add <code>new BatchSpanProcessor({ exporter })</code> from <code>@opentelemetry/sdk-trace</code>, wrapping the Agnost exporter, to the <code>spanProcessors</code> array of your existing <code>NodeSDK</code>. In OpenTelemetry JS 2.x, processors must be passed when the provider is constructed; they cannot be added afterwards.</p>
<p>To group spans by user and conversation, pass identity in <code>runtimeContext</code> and allowlist the fields to export. AI SDK 7 exports no runtime context unless each field is listed in <code>includeRuntimeContext</code>:</p>

```typescript
import { generateText } from 'ai';

const result = await generateText({
  model, // your existing provider model
  prompt,
  runtimeContext: { userId, sessionId: conversationId },
  telemetry: {
    isEnabled: true,
    functionId: 'support-answer',
    includeRuntimeContext: { userId: true, sessionId: true },
  },
});
```

<p><code>userId</code> and <code>conversationId</code> come from your authenticated request context. Keep secrets and sensitive request fields out of the allowlist. <code>recordInputs</code> and <code>recordOutputs</code> default to on; set them to <code>false</code> if prompts and responses must not leave your process. Agnost groups conversations by <code>sessionId</code> and users by <code>userId</code>.</p>
<p>The recommended <code>OpenTelemetry</code> integration names spans with the GenAI conventions: <code>invoke_agent {modelId}</code> for each <code>generateText</code> or <code>streamText</code> call, <code>step {n}</code> per step, <code>chat {modelId}</code> per model call, and <code>execute_tool {toolName}</code> per tool execution. <code>LegacyOpenTelemetry</code> keeps the older <code>ai.generateText</code>, <code>ai.streamText</code>, and <code>ai.toolCall</code> names if dashboards depend on them. See the <a href="https://ai-sdk.dev/docs/ai-sdk-core/telemetry">AI SDK telemetry reference</a> for the full option list.</p>
<p>Register the exporter in the runtime that actually handles your calls; a provider initialized in another process cannot collect them. Run one request, open <strong>Events</strong> in Agnost, and confirm the spans arrived before checking <strong>Conversations</strong> for grouping.</p>
<h2 id="worked-example-the-first-token-is-fast-but-the-answer-never-finishes">Worked example: the first token is fast, but the answer never finishes</h2>
<p>Consider a streaming order assistant. It immediately emits “Let me check,” calls an order service, and then the browser disconnects. This illustrative sequence shows why a single latency value is insufficient.</p>
<table>
<thead>
<tr>
<th>Observation point</th>
<th>What happened</th>
<th>Safe conclusion</th>
</tr>
</thead>
<tbody>
<tr>
<td>First visible text</td>
<td>A short acknowledgement appeared</td>
<td>The interface responded</td>
</tr>
<tr>
<td>Tool start</td>
<td>Order lookup began</td>
<td>Useful work is still pending</td>
</tr>
<tr>
<td>Client disconnect</td>
<td>The browser connection closed</td>
<td>Delivery observation ended</td>
</tr>
<tr>
<td>Backend completion</td>
<td>A final answer was generated later</td>
<td>The server finished; receipt is unproven</td>
</tr>
</tbody>
</table>
<p>Do not count the acknowledgement as a completed answer. Do not count backend completion as proof the customer saw the order status. Preserve the request ID so client and server evidence can be connected without treating their records as two requests.</p>
<p>Inspect whether cancellation propagates to the underlying work and whether terminal callbacks can race. Your end-once guard should prevent an error callback and a finish callback from recording contradictory terminal states for the same interaction.</p>
<p>In Agnost, tool records can explain dependency delay, while your explicit public interaction records completion or failure. Client rendering requires separate application evidence. A screenshot of a tool dashboard cannot establish end-to-end delivery.</p>
<figure><a href="/blog/framework-guides/agnost-demo-tools.png" target="_blank" rel="noopener noreferrer" aria-label="Open full-size Agnost demo screenshot"><img src="/blog/framework-guides/agnost-demo-tools.png" alt="Agnost tools view with illustrative demo data" width="1280" height="720" loading="lazy" decoding="async"></a><figcaption><strong>Product demo · illustrative data.</strong> Tool success and tail latency can explain a gap in streamed output. This shared demo shows the monitoring surface; it does not measure AI SDK first-token or browser-render timing. Select the image to inspect it at full size.</figcaption></figure>
<h2 id="metrics-that-answer-useful-vercel-ai-sdk-questions">Metrics that answer useful Vercel AI SDK questions</h2>
<p>Use these definitions to design your measurement plan. Calculate them from the required application or tracing evidence; they are not all precomputed dashboard metrics.</p>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Definition</th>
<th>Interpretation</th>
</tr>
</thead>
<tbody>
<tr>
<td>Time to first visible output</td>
<td>First rendered content time minus client request time</td>
<td>Server first-token timing is a different measurement.</td>
</tr>
<tr>
<td>Generation completion rate</td>
<td>Normally completed generations / started generations</td>
<td>Retain failed, cancelled, and unknown states.</td>
</tr>
<tr>
<td>Tool P90</td>
<td>90th percentile of recorded tool durations</td>
<td>Segment by tool; this is not full response time.</td>
</tr>
</tbody>
</table>
<h2 id="decide-which-duration-you-are-measuring">Decide which duration you are measuring</h2>
<table>
<thead>
<tr>
<th>Measurement</th>
<th>Start and end</th>
<th>What it reveals</th>
</tr>
</thead>
<tbody>
<tr>
<td>Server generation duration</td>
<td>Generation requested to generation finished</td>
<td>Backend work</td>
</tr>
<tr>
<td>Time to first visible output</td>
<td>User request to first rendered content</td>
<td>Perceived responsiveness</td>
</tr>
<tr>
<td>Full visible response time</td>
<td>User request to completed rendered answer</td>
<td>End-to-end experience</td>
</tr>
<tr>
<td>Tool duration</td>
<td>Tool started to tool returned</td>
<td>Dependency behavior</td>
</tr>
</tbody>
</table>
<p>Server telemetry cannot prove that a browser rendered an answer. Capture client experience separately if you need it, linked through an application request ID. Keep that identifier distinct from a conversation spanning several turns.</p>
<h2 id="begin-with-a-non-streaming-boundary">Begin with a non-streaming boundary</h2>
<p>The following server-side adapter wraps <code>generateText</code>. It accepts a configured model from your existing application, preserving your provider choice. Install <code>agnostai</code> alongside <code>ai</code> and your provider package.</p>
<p><em>Example scope: the code below is an integration adapter for an existing application. Configure its framework, model, credentials, and output contract as described; the demo screenshots were not generated by running these snippets.</em></p>
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8;overflow-x:auto" tabindex="0" data-language="typescript"><code><span class="line"><span style="color:#F97583">import</span><span style="color:#79B8FF"> *</span><span style="color:#F97583"> as</span><span style="color:#E1E4E8"> agnost </span><span style="color:#F97583">from</span><span style="color:#9ECBFF"> 'agnostai'</span><span style="color:#E1E4E8">;</span></span>
<span class="line"><span style="color:#F97583">import</span><span style="color:#E1E4E8"> { generateText, </span><span style="color:#F97583">type</span><span style="color:#E1E4E8"> LanguageModel } </span><span style="color:#F97583">from</span><span style="color:#9ECBFF"> 'ai'</span><span style="color:#E1E4E8">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583">const</span><span style="color:#79B8FF"> orgId</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> process.env.</span><span style="color:#79B8FF">AGNOST_ORG_ID</span><span style="color:#E1E4E8">;</span></span>
<span class="line"><span style="color:#F97583">if</span><span style="color:#E1E4E8"> (</span><span style="color:#F97583">!</span><span style="color:#E1E4E8">orgId) </span><span style="color:#F97583">throw</span><span style="color:#F97583"> new</span><span style="color:#B392F0"> Error</span><span style="color:#E1E4E8">(</span><span style="color:#9ECBFF">'AGNOST_ORG_ID is required'</span><span style="color:#E1E4E8">);</span></span>
<span class="line"><span style="color:#E1E4E8">agnost.</span><span style="color:#B392F0">init</span><span style="color:#E1E4E8">(orgId);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583">export</span><span style="color:#F97583"> async</span><span style="color:#F97583"> function</span><span style="color:#B392F0"> observedGenerate</span><span style="color:#E1E4E8">(</span></span>
<span class="line"><span style="color:#FFAB70">  model</span><span style="color:#F97583">:</span><span style="color:#B392F0"> LanguageModel</span><span style="color:#E1E4E8">,</span></span>
<span class="line"><span style="color:#FFAB70">  prompt</span><span style="color:#F97583">:</span><span style="color:#79B8FF"> string</span><span style="color:#E1E4E8">,</span></span>
<span class="line"><span style="color:#FFAB70">  userId</span><span style="color:#F97583">:</span><span style="color:#79B8FF"> string</span><span style="color:#E1E4E8">,</span></span>
<span class="line"><span style="color:#FFAB70">  conversationId</span><span style="color:#F97583">:</span><span style="color:#79B8FF"> string</span><span style="color:#E1E4E8">,</span></span>
<span class="line"><span style="color:#E1E4E8">) {</span></span>
<span class="line"><span style="color:#6A737D">  // Supply sanitized content at this boundary.</span></span>
<span class="line"><span style="color:#F97583">  const</span><span style="color:#79B8FF"> interaction</span><span style="color:#F97583"> =</span><span style="color:#E1E4E8"> agnost.</span><span style="color:#B392F0">begin</span><span style="color:#E1E4E8">({</span></span>
<span class="line"><span style="color:#E1E4E8">    userId,</span></span>
<span class="line"><span style="color:#E1E4E8">    conversationId,</span></span>
<span class="line"><span style="color:#E1E4E8">    agentName: </span><span style="color:#9ECBFF">'ai-sdk-assistant'</span><span style="color:#E1E4E8">,</span></span>
<span class="line"><span style="color:#E1E4E8">    input: prompt,</span></span>
<span class="line"><span style="color:#E1E4E8">    properties: { framework: </span><span style="color:#9ECBFF">'vercel-ai'</span><span style="color:#E1E4E8">, agentVersion: </span><span style="color:#9ECBFF">'assistant-v1'</span><span style="color:#E1E4E8"> },</span></span>
<span class="line"><span style="color:#E1E4E8">  });</span></span>
<span class="line"><span style="color:#F97583">  try</span><span style="color:#E1E4E8"> {</span></span>
<span class="line"><span style="color:#F97583">    const</span><span style="color:#79B8FF"> result</span><span style="color:#F97583"> =</span><span style="color:#F97583"> await</span><span style="color:#B392F0"> generateText</span><span style="color:#E1E4E8">({ model, prompt });</span></span>
<span class="line"><span style="color:#E1E4E8">    interaction?.</span><span style="color:#B392F0">end</span><span style="color:#E1E4E8">(result.text);</span></span>
<span class="line"><span style="color:#F97583">    return</span><span style="color:#E1E4E8"> result;</span></span>
<span class="line"><span style="color:#E1E4E8">  } </span><span style="color:#F97583">catch</span><span style="color:#E1E4E8"> (error) {</span></span>
<span class="line"><span style="color:#E1E4E8">    interaction?.</span><span style="color:#B392F0">end</span><span style="color:#E1E4E8">(error </span><span style="color:#F97583">instanceof</span><span style="color:#B392F0"> Error</span><span style="color:#F97583"> ?</span><span style="color:#E1E4E8"> error.name </span><span style="color:#F97583">:</span><span style="color:#9ECBFF"> 'GenerationError'</span><span style="color:#E1E4E8">, </span><span style="color:#79B8FF">false</span><span style="color:#E1E4E8">);</span></span>
<span class="line"><span style="color:#F97583">    throw</span><span style="color:#E1E4E8"> error;</span></span>
<span class="line"><span style="color:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#E1E4E8">}</span></span></code></pre>
<p>Sanitize output before <code>end</code> if it may contain sensitive material. Initialize once in your server process. Flush at shutdown using <code>await agnost.shutdown()</code>. For serverless environments, integrate flushing with the runtime’s supported request lifecycle; do not assume a background timer will run after the response finishes.</p>
<p>This example records generation completion. It does not observe client rendering, and it does not record tool spans; the OpenTelemetry setup above does. The AI SDK’s <a href="https://ai-sdk.dev/docs/ai-sdk-core/generating-text">text generation documentation</a> explains the distinction between generation and streaming APIs.</p>
<h2 id="streaming-needs-a-terminal-state">Streaming needs a terminal state</h2>
<p>Do not end an interaction immediately after obtaining the stream object. At that moment the answer may barely have started. Connect your recording to the terminal callbacks or stream-consumption lifecycle supported by your installed AI SDK version. In AI SDK 7, <code>streamText</code>’s <code>onFinish</code> callback was renamed <code>onEnd</code>; the old name still works as a deprecated alias.</p>
<p>Your application should distinguish:</p>
<ul>
<li><strong>Completed:</strong> the observed generation reached its normal terminal state.</li>
<li><strong>Failed:</strong> generation or stream processing encountered an error.</li>
<li><strong>Cancelled:</strong> the request was intentionally aborted or disconnected according to your application policy.</li>
<li><strong>Unknown:</strong> you lost the observation before a terminal state was recorded.</li>
</ul>
<p>Those are application states to implement, not automatic conclusions Agnost draws from a text chunk. Use an end-once guard when several callbacks can terminate the same interaction. Preserve whether a partial answer existed, but do not label partial text a completed answer.</p>
<p>A client disconnect can happen after useful content was delivered or before anything rendered. That is why cancellation counts and client experience need context. Repeatedly counting every disconnect as a model failure can send investigation in the wrong direction.</p>
<h2 id="investigate-tools-inside-a-streaming-turn">Investigate tools inside a streaming turn</h2>
<p>A pause in visible tokens may be a tool call rather than slow generation. For an order-status assistant, inspect the order lookup duration and structured result. If the lookup returns “not found,” the agent may still produce a fluent answer; transport success does not establish task completion.</p>
<p>Record tool outcomes from the tool implementation and product outcomes from the authoritative system. Avoid counting each model step as a new conversation. One user turn may legitimately include multiple model and tool operations.</p>
<p>When comparing releases, separate text-only questions from tool-heavy requests. A change in the incoming mix can move average response time without a regression in either category.</p>
<h2 id="inspect-the-interaction-in-agnost">Inspect the interaction in Agnost</h2>
<p>Use <strong>Users</strong> for the sequence of user turns and <strong>Events</strong> for the records and spans received. For a slow request, ask whether the user waited for the first output, a tool, or the final completion. For a bad answer, inspect the tool evidence and public response together.</p>
<p>If the dashboard contains only completed answers, inspect error and abort paths before interpreting reliability. An instrumentation path that runs only in a normal finish callback can systematically hide the cases you most need to see.</p>
<h2 id="related-guides">Related guides</h2>
<p>For application frameworks that manage their own exporter layer, see <a href="/blog/mastra-monitoring-observability-guide/">Mastra observability</a>.</p>
<p>Browse all <a href="/blog/agent-observability-framework-guides/">agent observability guides by framework</a>.</p>

## Frequently asked questions

### How do I add observability to a Vercel AI SDK app?

Register the AI SDK's OpenTelemetry integration and send its spans to a monitoring backend. In AI SDK 7, install @ai-sdk/otel and an OpenTelemetry SDK, start a NodeSDK with an OTLP exporter, and call registerTelemetry(new OpenTelemetry()) once at startup. For production monitoring of whole conversations, point the exporter at Agnost AI (https://otel.agnost.ai/v1/traces with your X-Agnost-Org-ID header) and pass userId and sessionId in runtimeContext. Agnost groups calls by user and session, detects failures, frustration, intents, and tool-call errors, judges plain-language rules on every conversation, alerts in Slack or email, and can open a pull request with a fix tested against past runs.

### How do I use OpenTelemetry with the Vercel AI SDK?

In AI SDK 7, install @ai-sdk/otel and an OpenTelemetry SDK such as @opentelemetry/sdk-node with an OTLP exporter. Start the OpenTelemetry SDK at startup, then call registerTelemetry(new OpenTelemetry()) once. Every generateText, streamText, and tool execution then emits GenAI spans (invoke_agent, step, chat, execute_tool) to your exporter. In Next.js, do this in instrumentation.ts.

### Which AI monitoring tools integrate with the Vercel AI SDK?

Any backend that accepts OpenTelemetry traces. The AI SDK's observability page lists integrations including Langfuse, LangSmith, Braintrust, Datadog, Sentry, PostHog, Helicone, Axiom, Laminar, MLflow, SigNoz, Traceloop, and Weave. Agnost receives the same spans over OTLP and groups them into user conversations.

### Why did my experimental_telemetry setup stop producing traces?

AI SDK 7 moved OpenTelemetry out of the ai package. experimental_telemetry still works as a deprecated alias for telemetry, but no spans are produced until you install @ai-sdk/otel and call registerTelemetry(new OpenTelemetry()). User and session IDs also moved from telemetry metadata to runtimeContext, and each field must be listed in telemetry.includeRuntimeContext to be exported.

### Why does telemetry show nothing?

Check that registerTelemetry runs once at startup in the process that handles your AI calls, that the OpenTelemetry exporter starts before the first call, that the exporter has the right endpoint and organization header, and that serverless runtimes flush before they exit. Telemetry is on by default once an integration is registered, so a call only goes silent if it sets telemetry.isEnabled to false.

### Should I send every token as an Agnost interaction?

No. Tokens are pieces of one response. Capture a coherent interaction at completion or another explicit terminal state; use traces and timing signals for stream behavior.
