Skip to navigation

Trace attributes

Runtype reads HTTP headers, resource attributes, and span attributes from incoming OpenTelemetry Protocol (OTLP) over HTTP trace and log exports. This page lists each header and attribute, where to set it, its accepted values, what it does, and what happens when it’s absent.

Minimum attributes

Set these attributes to populate runs and pass the first-trace check, which checks attribution, content, system_prompt, tool_definitions, tool_io, conversation_id, environment, and end_user_id (optional):

  • gen_ai.operation.name on agent, model, and tool spans
  • gen_ai.agent.name
  • gen_ai.request.model
  • gen_ai.usage.input_tokens and gen_ai.usage.output_tokens
  • gen_ai.conversation.id
  • user.id
  • gen_ai.input.messages, gen_ai.system_instructions, gen_ai.output.messages, gen_ai.tool.definitions, gen_ai.tool.call.arguments, and gen_ai.tool.call.result
  • deployment.environment.name

HTTP headers

The following table lists the HTTP headers that Runtype reads on requests to /v1/otel/v1/traces and /v1/otel/v1/logs:

HeaderAccepted valuesWhat it doesWhen absent
AuthorizationBearer YOUR_API_KEY (product ingest key for traces, or telemetry API key with TELEMETRY:WRITE or AGENTS:WRITE)Authenticates the export. A product ingest key can send traces only. OTLP logs need a telemetry API key.Returns 401. A non-API-key credential, a product ingest key on /v1/otel/v1/logs or /v1/otel/v1/metrics, or a key without TELEMETRY:WRITE or AGENTS:WRITE returns 403.
x-runtype-agent-idRuntype agent ID (agent_...)Identifies the receiving agent. See Attribution precedence and limits.See Attribution precedence and limits.
Content-Typeapplication/x-protobuf, application/protobuf, or application/jsonSelects the OTLP payload decoder.Defaults to application/x-protobuf. Any other media type returns 415.
Content-Encodinggzip, deflate, or identityDecompresses the request body before decoding.Reads the request body uncompressed. Any other encoding, such as zstd, returns 415.

With a telemetry API key, Runtype accepts requests to /v1/otel/v1/metrics with 200 and doesn’t store metric data. A product ingest key returns 403.

Agent attribution

The following table lists the attributes that determine which Runtype agent receives a trace or log export:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
runtype.agent.idResource attribute, or span attribute on an invoke_agent or parentless root span. Resource attribute on OTLP logs.Non-empty Runtype agent ID (agent_...)Files the trace or log record under that agent. With a product ingest key, the agent must belong to the product or to no product (unreachable_agent otherwise).See Attribution precedence and limits.
runtype.agent.nameSpan attributeNon-empty string, trimmed and truncated to 255 charactersWith a product ingest key, names the agent for that span ahead of gen_ai.agent.name and ai.telemetry.functionId, creating an agent in the product if unseen. Ignored with a telemetry API key.Falls back to gen_ai.agent.name.
gen_ai.agent.nameSpan attribute (invoke_agent preferred, then any span)Non-empty string, trimmed and truncated to 255 charactersSets the agent display name on the run. With a product ingest key, resolves or creates the product’s agent when runtype.agent.id and runtype.agent.name are absent.Falls back to ai.telemetry.functionId with a product ingest key, or leaves the display name unset.
ai.telemetry.functionIdSpan attribute (Vercel AI SDK)Non-empty string, trimmed and truncated to 255 charactersFallback agent name when runtype.agent.name and gen_ai.agent.name are absent. Also sets the agent display name on Vercel AI SDK runs.Runtype reads no Vercel AI SDK function name.
service.nameResource attribute (OTEL_SERVICE_NAME)Non-empty string not starting with unknown_service, trimmed and truncated to 255 charactersWith a product ingest key, names the agent when no span does and the trace has been idle for 10 minutes.Runtype refuses the trace with missing_agent_attribution after 10 minutes.

Attribution precedence and limits

Runtype resolves agent ownership by credential and signal:

  • Telemetry API key: Checks the runtype.agent.id resource attribute, then the x-runtype-agent-id header, and then runtype.agent.id on an invoke_agent or parentless root span. Without any of these, Runtype rejects the trace with 400 (missing_agent_attribution). Conflicting runtype.agent.id resource attributes, or conflicting runtype.agent.id span attributes without a resource attribute or header, reject the trace with ambiguous_agent_attribution.
  • Product ingest key: Checks runtype.agent.id (resource attribute, then invoke_agent or parentless root span), then span agent name (runtype.agent.name, then gen_ai.agent.name, then ai.telemetry.functionId), and then the x-runtype-agent-id header when no span names an agent. When a nested span names a different agent from its nearest named ancestor, Runtype creates a child run for that agent and records a subagent tool call on the parent run. When two agents run side by side in one trace, neither inside the other, each gets its own run: one is listed as a child of the other’s run, with no subagent tool call. One trace can hold at most 20 runs (run_limit_reached), and one product can gain at most 50 trace-created agents (agent_limit_reached). A trace that names no agent waits up to 10 minutes for a naming span, then falls back to service.name.
  • OTLP logs: Requires a telemetry API key (a product ingest key returns 403). Checks runtype.agent.id on the log resource, then the x-runtype-agent-id header. Without either, Runtype discards those LogRecord entries and returns OTLP partial_success. A trace ID on a LogRecord links it to the trace in Logs, but doesn’t create a run.

OTLP LogRecord entries follow the receiving agent’s logging policy and personally identifiable information (PII) redaction setting. With Verbose logging set to Off, Runtype drops each record’s body and attributes and keeps its timestamp, severity, trace ID, span ID, and conversation ID. The log detail view shows Verbose logging off.

Environment and release

The following table lists the resource attributes that identify the deployment environment and software release of a trace. Runtype reads runtype.change.id and service.version regardless of content settings:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
deployment.environment.nameResource attributeNon-empty string, trimmed and truncated to 64 characters. production and prod (case-insensitive) count as production. Any other value counts as development.Tags the run’s environment. Observed profiles and post-ship prediction comparisons read only production runs. The first-trace check inspects development runs first.Falls back to deployment.environment. When neither is set, the run has no environment, counts as development, and fails the environment check.
deployment.environmentResource attributeSame as deployment.environment.nameFallback environment attribute when deployment.environment.name is absent.Runtype records no environment on the run.
runtype.change.idResource attributeNon-empty string up to 128 characters after removing control characters and trimming whitespace. To match an exported change brief, must hold the brief’s changeId (starts with acb_).Records the shipped change ID on the run. On production traces exported with a product ingest key, marks the matching exported change brief as shipped and groups post-ship runs for comparison.Runtype records no change ID and the brief stays not_shipped. A later export that omits it doesn’t clear it.
runtype.content.captureResource attributewithheld (case-insensitive). Set it from the RUNTYPE_CONTENT environment variable on the provider that exports to Runtype.Declares that the app keeps conversation content out of its traces on purpose. A run with no readable content then makes the first-trace check return degraded with a warning instead of failing, and the observed profile reports contentWithheldByApp.A run with no readable content fails the first-trace content check.
service.versionResource attributeNon-empty string up to 128 characters after removing control characters and trimming whitespaceRecords the process release version on the run and appears on observed profile change events.Runtype records no service version. A later export that omits it doesn’t clear it.

The following environment variable marks production traces with the change ID from an exported change brief:

Environment and change marker
OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=production,runtype.change.id=YOUR_CHANGE_ID

Replace YOUR_CHANGE_ID with the changeId returned when you export a change brief. For more information, see Check the prediction after you ship.

Conversation and end-user identity

The following table lists the attributes that group runs into conversations and identify end users:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
gen_ai.conversation.idSpan attribute (invoke_agent preferred, then any span). Log record attribute or resource attribute on OTLP logs.Non-empty string. Use an opaque identifier, not personal data or credentials.Groups runs from one conversation. Always wins over fallback session attributes across the trace.Checks session.id, then ai.telemetry.metadata.sessionId, then thread_id inside metadata. When none is set, fails the conversation_id check.
session.idSpan attribute or resource attributeNon-empty string or finite numberFallback conversation ID when no span sets gen_ai.conversation.id.Falls back to ai.telemetry.metadata.sessionId.
ai.telemetry.metadata.sessionIdSpan attribute or resource attribute (Vercel AI SDK)Non-empty string or finite numberFallback conversation ID when gen_ai.conversation.id and session.id are absent.Falls back to thread_id inside metadata.
metadata (thread_id key)Span attribute or resource attribute (OpenInference and LangGraph)JSON object string up to 64 KiB (65,536 characters) with a non-empty string or finite number thread_id propertyFallback conversation ID when gen_ai.conversation.id, session.id, and ai.telemetry.metadata.sessionId are absent.Runtype records no conversation ID on the run.
user.idSpan attribute or resource attributeNon-empty string or finite numberRecords the end-user ID on the run.Falls back to enduser.id.
enduser.idSpan attribute or resource attributeNon-empty string or finite numberFallback end-user ID when user.id is absent.Falls back to ai.telemetry.metadata.userId.
ai.telemetry.metadata.userIdSpan attribute or resource attribute (Vercel AI SDK)Non-empty string or finite numberFallback end-user ID when user.id and enduser.id are absent.Runtype records no end-user ID on the run (end_user_id is optional in the first-trace check).

Runtype resolves the fallback conversation ID and the end-user ID independently. For each field, the invoke_agent or parentless root span wins, followed by the earliest span by start time.

If secret scrubbing or PII redaction changes a conversation ID or an end-user ID, or if the value is longer than 256 UTF-8 bytes, Runtype records a stable per-account one-way digest in its place, starting with otel-conversation-v1- or otel-end-user-v1-. Different IDs keep different digests. The digest is a pseudonym, not anonymization.

Instrumentation provenance

The following table lists the attributes that record which library or adapter emitted a trace:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
runtype.adapter.nameResource attribute (checked first) or invoke_agent or parentless root span attribute (checked second)Non-empty string, truncated to 128 charactersRecords which library emitted the trace, regardless of logging policy. It doesn’t affect attribution or pricing.Runtype records no adapter name.
runtype.adapter.versionSame resource or span as runtype.adapter.nameNon-empty string, truncated to 128 charactersRecords the emitting library’s version alongside runtype.adapter.name. Runtype reads this attribute only when runtype.adapter.name is present on the same resource or span.Runtype records only runtype.adapter.name, or neither when runtype.adapter.name is absent.

The following environment variable sets adapter provenance on the resource:

Adapter provenance
OTEL_RESOURCE_ATTRIBUTES=runtype.agent.id=agent_YOUR_AGENT_ID,runtype.adapter.name=my-exporter,runtype.adapter.version=1.4.0

Replace agent_YOUR_AGENT_ID with the ID of the receiving Runtype agent.

@runtypelabs/flue-otel sets both attributes on every invoke_agent span that it opens. For Flue setup details, see Instrument a Flue agent. @runtypelabs/runtime, @runtypelabs/openclaw-adapter, @runtypelabs/pi-otel, @runtypelabs/cloudflare-agents, and runtype-pydantic-ai also set both attributes automatically. Your resource attribute takes precedence if you set both.

Agent version and release alias

The following table lists the attributes that file a run under a published Runtype agent version and release alias:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
runtype.agent.version_idResource attribute (checked first) or invoke_agent or parentless root span attribute (checked second)Published version ID (agentver_..., up to 128 characters) belonging to the attributed agentGroups the run with that agent version in Runs, trends, and eval capture. If the version ID doesn’t belong to the attributed agent, Runtype drops the version claim and still accepts the run.Runtype doesn’t group the run under a specific agent version.
runtype.agent.aliasSame resource or span as runtype.agent.version_idRelease alias string (for example, live or canary), up to 128 charactersRecords that the version was resolved through an alias (alias) rather than pinned to a version. Runtype reads this attribute only when runtype.agent.version_id is set on the same resource or span.When runtype.agent.version_id is present, Runtype records that the run was pinned to that version (version).
runtype.agent.alias_revisionSame resource or span as runtype.agent.version_idFinite integer (number or digit string)Records the alias revision on the run.Runtype records no alias revision.

The following environment variable tags runs with a published agent version and release alias:

Agent version and alias
OTEL_RESOURCE_ATTRIBUTES=runtype.agent.id=agent_YOUR_AGENT_ID,runtype.agent.version_id=agentver_YOUR_VERSION_ID,runtype.agent.alias=live

Replace the following:

  • agent_YOUR_AGENT_ID: the ID of the receiving Runtype agent.
  • agentver_YOUR_VERSION_ID: the published version ID belonging to that agent.

Agents exported with @runtypelabs/runtime emit these attributes automatically from ExportedAgent.release. For details, see Self-hosting (BYOC).

Operations, models, usage, and tools

Runtype creates a run for a trace when any span carries a generative AI (GenAI) operation (gen_ai.operation.name), a model ID (gen_ai.request.model or gen_ai.response.model), or one of the runtype.* attributes or span events marked as qualifying in Runtype execution extensions. Otherwise the trace stays in Logs and creates no run.

The following table lists the GenAI span attributes that Runtype reads for run structure, models, token counts, and tool calls:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
gen_ai.operation.nameSpan attributeinvoke_agent, chat, generate_content, text_completion, execute_tool, or another non-empty GenAI operation stringClassifies the span. invoke_agent opens and closes the run, and its end time completes the run. chat, generate_content, and text_completion record model calls. execute_tool records a tool call.Runtype still treats a span with gen_ai.response.model or gen_ai.request.model as a model call, or uses the mappings in Framework-specific span attributes.
gen_ai.response.modelModel-call span attributeModel ID string served by the providerIdentifies the served model. Runtype uses this value first for cost estimation and model attribution.Falls back to gen_ai.request.model.
gen_ai.request.modelModel-call span attribute (or invoke_agent span)Model ID string requested from the providerIdentifies the requested model. Runtype uses this value for cost estimation when gen_ai.response.model is absent or not found in the Runtype model catalog.Runtype records no model unless gen_ai.response.model is set, and can’t calculate a catalog cost estimate.
gen_ai.usage.input_tokensModel-call span attribute (or invoke_agent span for a run-level roll-up)Non-negative integerRecords input token count and feeds the cost estimate. On invoke_agent, sets the run total. Otherwise Runtype adds up the model calls.Treated as 0 for that span. Runtype records no token total if no span reports usage.
gen_ai.usage.output_tokensModel-call span attribute (or invoke_agent span for a run-level roll-up)Non-negative integerRecords output token count and feeds the cost estimate.Treated as 0 for that span.
gen_ai.usage.cache_read.input_tokensModel-call span attribute (or invoke_agent span)Non-negative integerRecords prompt-cache read tokens for cache-aware cost estimation.Treated as 0.
gen_ai.usage.cache_creation.input_tokensModel-call span attribute (or invoke_agent span)Non-negative integerRecords prompt-cache write tokens for cache-aware cost estimation.Treated as 0 unless gen_ai.usage.cache_write.input_tokens applies on an eve trace.
gen_ai.usage.cache_write.input_tokenschat span attribute on traces where agent.framework.name is eveNon-negative integerAlternative prompt-cache write token count for Vercel’s eve framework. Runtype ignores this attribute when gen_ai.usage.cache_creation.input_tokens is also set on the span.Runtype reads no alternative cache-write count.
gen_ai.response.finish_reasonsModel-call span attributeArray of strings (for example, ["stop"] or ["tool_calls"])Records the model’s finish reasons on the span and helps detect tool usage during the first-trace check.Falls back to runtype.provider.finish_reason. Otherwise Runtype records no finish reasons.
gen_ai.tool.nameexecute_tool span attributeNon-empty string, truncated to 255 charactersRecords the tool name on the tool call.Falls back to runtype.tool.name, then the text after the first space in the span name, then the span name, then unknown.
gen_ai.tool.call.idexecute_tool span attributeNon-empty stringCorrelates tool start, tool completion, and approval lifecycle spans.Falls back to the span’s spanId.
gen_ai.tool.typeexecute_tool or approval span attributeNon-empty stringKept on the span in Logs and recorded on Cloudflare Agents SDK tool approvals. It doesn’t set the tool call’s category. Use runtype.tool.type for that.Omitted.

Runtype calculates a cost estimate from token counts and the Runtype model catalog. Your model provider bills you for the calls, so treat the figure as an estimate.

Span status and errors

Runtype determines run and tool outcomes from OpenTelemetry span status and exception span events:

  • ERROR (code 2): Marks an invoke_agent run or execute_tool call as failed. Runtype reads the error message from status.message.
  • UNSET (code 0) with an exception event: Marks an invoke_agent run as failed and reads the error message from exception.type and exception.message on the event. Without an exception event, UNSET counts as successful.
  • OK (code 1): Counts as successful, even when the span carries an exception event.
  • Traces without an invoke_agent or parentless root span: After every span has ended, Runtype marks the run as failed when its last spans to end report errors.

Runtype execution extensions

Optional runtype.* span attributes and span events record loop structure, parent-child run links, tool categories, self-reported cost, provider finish reasons, and approval spans. The following table lists the runtype.* span attributes that Runtype reads:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
runtype.execution.idAny span attributeNon-empty stringQualifies the trace to create a run. Doesn’t set the run ID.Has no effect if another attribute qualifies the trace.
runtype.parent.execution_idinvoke_agent or parentless root span attributeNon-empty stringLinks a child run to the parent execution that spawned it. With a product ingest key, a run created from an agent handoff in the same trace keeps that link instead.Runtype records no parent execution link.
runtype.parent.tool_call_idinvoke_agent or parentless root span attributeNon-empty stringLinks a child run under a specific parent execute_tool call instead of the parent run as a whole.Runtype records no parent tool-call link.
runtype.iterationAny span attribute (also accepts runtype.agent.iteration)Non-negative integer up to 2,147,483,646 (0-based)Groups model and tool spans into per-iteration breakdowns. Child spans inherit the position from their nearest ancestor. Qualifies the trace to create a run.Runtype records no per-iteration breakdown.
runtype.iterationsinvoke_agent or parentless root span attributeNon-negative integer up to 2,147,483,646Sets the run’s total iteration count.Derived from the highest runtype.iteration plus one, or omitted when no span sets runtype.iteration.
runtype.turn.idAny span attributeNon-empty stringRecords turn identity on spans and model calls. Qualifies the trace to create a run.Runtype records no turn ID.
runtype.turn.indexAny span attribute (also accepts runtype.agent.turnIndex)Non-negative integerRecords the turn index on the span. Qualifies the trace to create a run.Runtype records no turn index.
runtype.stop_reasoninvoke_agent or parentless root span attributeNon-empty string (for example, max_turns)Sets the run’s stop reason. Qualifies the trace to create a run.A failed run reports error. A successful run leaves the stop reason unset.
runtype.total_costinvoke_agent or parentless root span attribute (also accepts runtype.agent.totalCost)Positive number up to 9999.999999 (USD)Your own cost figure for the run (USD). Runtype shows it only when it can’t price the run’s models from the model catalog. Runtype ignores values outside the range.Runtype uses only catalog-priced cost estimates.
runtype.tools.reportedAny span attributeBoolean (true or false)Qualifies the trace to create a run.Has no effect if another attribute qualifies the trace.
runtype.tool.typeexecute_tool or approval span attributeflow, mcp, builtin, custom, external, advisor, subagent, local, data_connection, or searchSets the tool’s category on the run’s tool calls and qualifies the trace to create a run. Other values leave the category unset and don’t qualify the trace.Tool type is unset.
runtype.tool.nameexecute_tool or approval span attributeNon-empty stringFallback tool name when gen_ai.tool.name is absent.Falls back to gen_ai.tool.name or the span name.
runtype.approval.decisionApproval span attributerequested, approved, or deniedOn a span with no tool call arguments or result, marks the span as an approval, not a tool call. On a span named tool_approval, tool_approval <tool-name>, or runtype.agent.approval, also qualifies the trace to create a run.Runtype records no approval decision on the span.
runtype.provider.finish_reasonModel-call (chat) span attributeNon-empty stringRecords the provider’s raw finish reason and acts as a fallback when gen_ai.response.finish_reasons is absent.Omitted.

Runtype also recognizes these span names and span events:

  • Approval spans: A span named tool_approval, tool_approval <tool-name>, or runtype.agent.approval appears as an approval rather than a tool call. When paired with runtype.approval.decision, it qualifies the trace to create a run.
  • Approval span events: runtype.approval.requested and runtype.approval.resolved span events appear in Logs, and either event qualifies the trace to create a run.
  • Skill-load span events: runtype.skill.loaded span events appear in Logs, and the event qualifies the trace to create a run.

Framework-specific span attributes

When a trace comes from a supported framework instrumentation instead of raw GenAI attributes, Runtype maps its attributes onto the GenAI fields in the preceding tables. The following table lists the framework attributes that Runtype maps:

FrameworkSource attributesMapped behavior
Vercel AI SDKai.operationId (ai.generateText, ai.streamText, ai.generateObject, ai.streamObject, *.doGenerate, *.doStream, ai.toolCall), ai.model.id, ai.usage.promptTokens, ai.usage.completionTokens, ai.toolCall.name, ai.toolCall.idMaps onto gen_ai.operation.name, gen_ai.request.model, gen_ai.usage.*, gen_ai.tool.name, and gen_ai.tool.call.id.
OpenInference (LangGraph, OpenAI Agents SDK)openinference.span.kind (AGENT, CHAIN, LLM, TOOL), llm.request.model_name, llm.model_name, llm.response.model_name, llm.token_count.prompt, llm.token_count.completion, tool.name, agent.nameMaps onto gen_ai.operation.name, gen_ai.request.model, gen_ai.response.model, gen_ai.usage.*, gen_ai.tool.name, and gen_ai.agent.name (display name on AGENT spans).
Flue (@flue/opentelemetry)flue.agent.name, flue.operation.id, flue.turn.id, flue.instance.id, flue.submission.idIdentifies Flue traces, maps flue.turn.id onto runtype.turn.id, and shows the run’s model from its first model call.
Vercel eveagent.framework.name = eve, gen_ai.usage.cache_write.input_tokensMaps gen_ai.usage.cache_write.input_tokens onto gen_ai.usage.cache_creation.input_tokens on chat spans.
Cloudflare Agents SDKcloudflare.agents.integration.name, cloudflare.agents.operation.name = tool.approval, cloudflare.agents.tool.approval.state (requested, approved, denied), cloudflare.warning.type = span_not_endedShows tool approvals as read-only history (not as extra tool calls). A span Cloudflare marks span_not_ended stays in Logs and creates no run.

Content attributes

Runtype records conversation content only when your instrumentation puts it on the span. The following table lists the GenAI content attributes that Runtype reads:

AttributeWhere it is setAccepted valuesWhat it doesWhen absent
gen_ai.input.messagesinvoke_agent or model-call spanJSON array (or JSON-encoded string) of message objects with role and string content or text partsForms the run’s transcript.Checks alternative names (ai.prompt.messages, ai.prompt, llm.input_messages.*). If none is present, the run has no input transcript and fails the content check.
gen_ai.system_instructionsinvoke_agent or model-call spanNon-empty string or JSON array of text partsAdds this value as the leading system turn in the run’s transcript unless gen_ai.input.messages already opens with a system message.Checks for a system message in gen_ai.input.messages. When neither is present, the system_prompt check fails (or reports unknown on Vercel AI SDK runs).
gen_ai.output.messagesinvoke_agent or model-call spanJSON array (or JSON-encoded string) of message objects, a single message object, or a non-empty stringSets the run’s final output when the run succeeds. Emit it on chat spans even when the model reply is only tool calls.Checks alternative names (ai.response.text, ai.response.object, llm.output_messages.*). If none is present, the run has no final output and fails the content check.
gen_ai.tool.definitionsModel-call spanJSON array (or JSON-encoded string) of tool definition objects (up to 1,000 distinct tool names per trace)Records the tools and input schemas offered to the model for the agent’s observed profile and the tool_definitions check.Checks alternative names (ai.prompt.tools, llm.tools.*, llm.invocation_parameters, tool.parameters, llm.request.functions.*). If none is present on a run that called tools, the tool_definitions check fails (or reports unknown on Vercel AI SDK runs).
gen_ai.tool.call.argumentsexecute_tool spanJSON object or JSON-encoded object stringRecords the tool call’s input parameters on the run.Checks alternative names (flue.tool.call.arguments, ai.toolCall.args, input.value). If none is present, Runtype records no tool input and fails the tool_io check.
gen_ai.tool.call.resultexecute_tool spanJSON value or stringRecords the tool call’s result on the run when the tool call succeeded.Checks alternative names (flue.tool.call.result, ai.toolCall.result, output.value). If none is present, Runtype records no tool result and fails the tool_io check.

Alternative content attribute names

When a span carries both a standard GenAI content attribute and a framework-specific alternative, Runtype uses the standard attribute. The following table lists the alternative names that Runtype reads:

Canonical attributeFrameworkAlternative names
gen_ai.input.messagesVercel AI SDKai.prompt.messages, ai.prompt
gen_ai.input.messagesOpenInferencellm.input_messages.<i>.message.role, llm.input_messages.<i>.message.content, llm.input_messages.<i>.message.contents.<j>.message_content.text
gen_ai.output.messagesVercel AI SDKai.response.text, ai.response.object
gen_ai.output.messagesOpenInferencellm.output_messages.<i>.message.role, llm.output_messages.<i>.message.content, llm.output_messages.<i>.message.contents.<j>.message_content.text
gen_ai.tool.call.argumentsFlueflue.tool.call.arguments
gen_ai.tool.call.argumentsVercel AI SDKai.toolCall.args
gen_ai.tool.call.argumentsOpenInferenceinput.value (on TOOL spans)
gen_ai.tool.call.resultFlueflue.tool.call.result
gen_ai.tool.call.resultVercel AI SDKai.toolCall.result
gen_ai.tool.call.resultOpenInferenceoutput.value (on TOOL spans)
gen_ai.tool.definitionsVercel AI SDKai.prompt.tools
gen_ai.tool.definitionsOpenInferencellm.tools.<i>.tool.json_schema, llm.invocation_parameters (tools key), tool.parameters with tool.name and tool.description
gen_ai.tool.definitionsOpenLLMetryllm.request.functions.<i>.name, llm.request.functions.<i>.description, llm.request.functions.<i>.parameters

When @runtypelabs/runtime sets runtype.context.blocks and runtype.context.manifest on a chat span, Runtype records the blocks as that model call’s input content and doesn’t show either attribute in the span’s attribute list in Logs.

Content limits and discarded attributes

Runtype scrubs credential-shaped strings from content attributes, replacing each match with [REDACTED:LABEL] (where LABEL names the matched credential type, such as RUNTYPE_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, GITHUB_TOKEN, AWS_ACCESS_KEY_ID, GOOGLE_API_KEY, SLACK_TOKEN, STRIPE_KEY, JWT, BEARER_TOKEN, or PRIVATE_KEY). Runtype replaces nested objects or arrays deeper than 64 levels with [DROPPED:DEPTH].

Runtype enforces three content size limits:

  • Per attribute: Drops a content attribute over 256 KiB (262,144 characters).
  • Per span: Drops content attributes past 384 KiB (393,216 characters) on one span.
  • Per trace (run content) and per export (Logs): Drops content attributes past 2 MiB (2,097,152 characters) across the whole trace for run content, and per export request for Logs. Splitting a trace across exporter batches doesn’t reset the run-content limit.

Runtype drops each affected value whole rather than truncating it. For per-trace span count and span data limits (trace_too_large), see Limits and pricing.

Content appears on the run, not in a span’s attribute list in Logs. Runtype discards the following framework content attributes and doesn’t keep them:

  • OpenInference: retrieval.documents.*, llm.prompt_template.*, embedding.embeddings.*, llm.prompts, llm.choices, and llm.function_call.
  • Mastra: mastra.<span-type>.input, mastra.<span-type>.output, and mastra.metadata.body.
  • Cloudflare Agents SDK: cloudflare.agents.metadata.* and cloudflare.agents.runtime_context.*.
  • Vercel AI SDK: ai.response.toolCalls.

For logging policy settings, PII redaction, and how to turn content capture on or off per framework, see Control what content is sent.

Next steps