A runtime context property of a Vercel AI SDK call that the app included in telemetry through telemetry.includeRuntimeContext, with <key> being the top-level context property name.
Scrubbing ReasonRuntime context is user-defined and can contain user data
Dynamic SuffixYes - the key contains dynamic parts
Additional Context
Set on gen_ai spans for invoke_agent, generate_content, execute_tool, embeddings, rerank and decide operations. Spans for model calls and tool calls inside an operation copy the attributes of that operation.
SDKs MUST only record the properties that the app included through telemetry.includeRuntimeContext. Some Vercel AI SDK versions expose the full runtime context to instrumentation. If an SDK cannot confirm that the Vercel AI SDK filtered the runtime context, it MUST NOT record it.
The Vercel AI SDK's own OpenTelemetry integration (@ai-sdk/otel) emits the same data as ai.settings.context.<key>.
Runtime context values can have any type. SDKs MUST convert them to strings, and SHOULD serialize objects and arrays as JSON.
This attribute is open-ended on purpose. The Vercel AI SDK does not define the runtime context keys.
{
"key": "vercel.ai.settings.context.<key>",
"brief": "A runtime context property of a Vercel AI SDK call that the app included in telemetry through `telemetry.includeRuntimeContext`, with <key> being the top-level context property name.",
"has_dynamic_suffix": true,
"type": "string",
"apply_scrubbing": {
"key": "auto",
"reason": "Runtime context is user-defined and can contain user data"
},
"is_in_otel": false,
"visibility": "public",
"examples": [
"vercel.ai.settings.context.tenantId='acme'"
],
"additional_context": [
"Set on `gen_ai` spans for `invoke_agent`, `generate_content`, `execute_tool`, `embeddings`, `rerank` and `decide` operations. Spans for model calls and tool calls inside an operation copy the attributes of that operation.",
"SDKs MUST only record the properties that the app included through `telemetry.includeRuntimeContext`. Some Vercel AI SDK versions expose the full runtime context to instrumentation. If an SDK cannot confirm that the Vercel AI SDK filtered the runtime context, it MUST NOT record it.",
"The Vercel AI SDK's own OpenTelemetry integration (`@ai-sdk/otel`) emits the same data as `ai.settings.context.<key>`.",
"Runtime context values can have any type. SDKs MUST convert them to strings, and SHOULD serialize objects and arrays as JSON.",
"This attribute is open-ended on purpose. The Vercel AI SDK does not define the runtime context keys."
],
"changelog": [
{
"version": "0.31.0",
"prs": [
756
],
"description": "Added vercel.ai.settings.context.<key> attribute"
}
]
}
Dynamic SuffixYes - the key contains dynamic parts
Additional Context
Set on gen_ai spans for invoke_agent, generate_content and embeddings operations. Not set on execute_tool spans.
The Vercel AI SDK's own OpenTelemetry spans emit the same data as ai.telemetry.metadata.<key>.
The Vercel AI SDK also allows numbers, booleans and arrays as metadata values. SDKs MUST convert these values to strings.
This attribute is open-ended on purpose. The Vercel AI SDK does not define the metadata keys. If Vercel defines a stricter spec for this metadata, consider moving it into gen_ai.* attributes.
{
"key": "vercel.ai.telemetry.metadata.<key>",
"brief": "Metadata passed to a Vercel AI SDK call through `experimental_telemetry.metadata`, with <key> being the metadata key name.",
"has_dynamic_suffix": true,
"type": "string",
"apply_scrubbing": {
"key": "auto",
"reason": "Metadata is user-defined and can contain user data"
},
"is_in_otel": false,
"visibility": "public",
"examples": [
"vercel.ai.telemetry.metadata.tenantId='acme'"
],
"additional_context": [
"Set on `gen_ai` spans for `invoke_agent`, `generate_content` and `embeddings` operations. Not set on `execute_tool` spans.",
"The Vercel AI SDK's own OpenTelemetry spans emit the same data as `ai.telemetry.metadata.<key>`.",
"The Vercel AI SDK also allows numbers, booleans and arrays as metadata values. SDKs MUST convert these values to strings.",
"This attribute is open-ended on purpose. The Vercel AI SDK does not define the metadata keys. If Vercel defines a stricter spec for this metadata, consider moving it into `gen_ai.*` attributes."
],
"changelog": [
{
"version": "0.26.0",
"prs": [
662
],
"description": "Added vercel.ai.telemetry.metadata.<key> attribute"
}
]
}
A tool context property of a Vercel AI SDK tool call that the app included in telemetry through telemetry.includeToolsContext, with <key> being the top-level context property name.
Scrubbing ReasonTool context is user-defined and can contain user data
Dynamic SuffixYes - the key contains dynamic parts
Additional Context
Set on gen_ai spans for execute_tool operations.
SDKs MUST only record the properties that the app included for the tool through telemetry.includeToolsContext. Some Vercel AI SDK versions expose the full tool context to instrumentation. If an SDK cannot confirm that the Vercel AI SDK filtered the tool context, it MUST NOT record it.
The Vercel AI SDK's own OpenTelemetry integration (@ai-sdk/otel) does not record tool context.
Tool context values can have any type. SDKs MUST convert them to strings, and SHOULD serialize objects and arrays as JSON.
This attribute is open-ended on purpose. The Vercel AI SDK does not define the tool context keys.
{
"key": "vercel.ai.tool_call.context.<key>",
"brief": "A tool context property of a Vercel AI SDK tool call that the app included in telemetry through `telemetry.includeToolsContext`, with <key> being the top-level context property name.",
"has_dynamic_suffix": true,
"type": "string",
"apply_scrubbing": {
"key": "auto",
"reason": "Tool context is user-defined and can contain user data"
},
"is_in_otel": false,
"visibility": "public",
"examples": [
"vercel.ai.tool_call.context.units='metric'"
],
"additional_context": [
"Set on `gen_ai` spans for `execute_tool` operations.",
"SDKs MUST only record the properties that the app included for the tool through `telemetry.includeToolsContext`. Some Vercel AI SDK versions expose the full tool context to instrumentation. If an SDK cannot confirm that the Vercel AI SDK filtered the tool context, it MUST NOT record it.",
"The Vercel AI SDK's own OpenTelemetry integration (`@ai-sdk/otel`) does not record tool context.",
"Tool context values can have any type. SDKs MUST convert them to strings, and SHOULD serialize objects and arrays as JSON.",
"This attribute is open-ended on purpose. The Vercel AI SDK does not define the tool context keys."
],
"changelog": [
{
"version": "0.31.0",
"prs": [
756
],
"description": "Added vercel.ai.tool_call.context.<key> attribute"
}
]
}