appIntegrations
One chat span per model step when your app registered @ai-sdk/otel itself: the layer leaves the app's integration out of the chat's calls, or keeps both.
appIntegrations matters only when your app registered the AI SDK’s OpenTelemetry integration itself
(registerTelemetry(new OpenTelemetry()) from @ai-sdk/otel) and its spans go to the same provider as the layer’s.
Both would then record every model step of the chat, so a backend would show each step twice. By default the layer
leaves the app’s integration out of the chat’s own calls, and says so once.
Example
To keep both, for example while you compare them:
import { defineObservability } from "@webmcp-agents/telemetry/server";
// The app also registered @ai-sdk/otel itself. By default ("dedupe")
// the chat's calls leave it out, so each step is one span; "keep"
// records every step twice, once by each.
export const observability = defineObservability({
appIntegrations: "keep",
});
Options
appIntegrations?"dedupe" | "keep"
What to do with the app's own @ai-sdk/otel integrations on a sampled request whose spans go to the same provider: leave them out of that call, or pass them along.
"dedupe" | "keep""dedupe"Every other option is on defineObservability.
Notes
When the app's integration is always kept
Other integrations the app registered always run. So does the app’s @ai-sdk/otel one on a request the layer does
not sample, and whenever the layer builds its own provider (exporters, spanProcessors, or the environment
alone).
An integration with another provider's tracer
An @ai-sdk/otel integration the app gave a tracer of another provider is left out as well. Pass "keep" then.
The app's integrations never record content
An integration the app registered still runs on each step but never records prompts or answers: it cannot redact, so only this layer’s spans carry content (Privacy and redaction).