Control what content is sent
Runtype stores conversation content only when your instrumentation puts it on the span. Without content, Runtype still records runs, models, token counts, tool names, and status. It can’t populate transcripts, observed prompts, text-based signals, simulations, or eval cases.
Check what your instrumentation sends by default
Each framework and adapter ships with its own default for prompts, outputs, system instructions, and tool payloads. The following table lists the default behavior and how to change it for each supported setup:
Keep conversation content out of traces
To stop prompts, messages, and tool payloads from leaving your infrastructure, turn content recording off in your instrumentation before export. Server-side settings in Runtype act only after spans arrive, so exporter-side controls are the way to keep sensitive text inside your boundary. Without content, Runtype can’t build transcripts, observed prompts, text-based signals, simulations, or eval cases.
Runtype receives exactly what your exporter sends. If your app already redacts or omits content, Runtype receives the redacted version, and your coding agent asks you before changing your existing telemetry.
Turn off content recording in your framework
The following setups need call-site options, environment variables, or extra output-hiding steps:
-
Vercel AI SDK: disable input and output recording at each call site. On AI SDK 7, pass
recordInputs: falseandrecordOutputs: falseintelemetry. On AI SDK 5 and 6, pass the same fields inexperimental_telemetry. The following example disables both fields on AI SDK 7:Vercel AI SDK 7In this example,
modelandpromptbelong to your application. -
LangGraph and OpenAI Agents SDK (OpenInference): set
OPENINFERENCE_HIDE_INPUTS=truein the process environment before your application starts to hide prompt inputs. Because Runtype still stores model outputs and tool results when OpenInference sends them, turn off output recording in your OpenInference configuration too. -
OpenAI Agents SDK for TypeScript: set
traceIncludeSensitiveData: falsein the run configuration. The SDK then leaves inputs and outputs off its model spans, so the trace processor sends none to Runtype. -
eve: set
tracePolicyinotel()inagent/instrumentation/otel.ts. ReturnrecordInputs: falseandrecordOutputs: falsefor the conversations to withhold. The policy sets the most content any destination receives, Runtype included. -
Pydantic AI: set
include_content=FalseonInstrumentationSettingswhen you use standard OpenTelemetry. When you useruntype-pydantic-ai, passcontent=Falsetoinstrument(), as shown in the following example:Pydantic AI adapter
For all other frameworks and adapters, use the setting in Check what your instrumentation sends by default.
Declare that content is withheld
When your app keeps content out of its traces on purpose, for example because conversations hold patient or customer data, declare it so Runtype treats the missing content as intended. Set RUNTYPE_CONTENT=withheld in the app’s environment file, and copy it into the runtype.content.capture resource attribute on the tracer provider that exports to Runtype:
With the declaration, the first-trace check returns the status degraded: the content check warns (warn, reason withheld_by_app) that the traces are below the fidelity Runtype needs, and get_status reports the same in traceFidelity. Attribution, model calls, tool names, conversation ID, and environment are still checked, and onboarding continues. Without the declaration, a run whose content is absent or only redaction markers fails the content check with exporter_not_sent (content absent) or looks_redacted (only redaction markers).
Withheld content limits what Runtype can do with the agent. Observed profiles carry no prompt text and report contentWithheldByApp, Runtype can’t make a copy of the agent for simulations, scenarios drawn from production conversations have no conversation text to work from, and signals that judge text have nothing to read. Whether to send content is the app owner’s decision; don’t turn content on only to pass the check.
Redact or limit content before export
First-party Runtype adapters let you omit specific kinds of content or scrub values in your process before spans leave it. The following options apply per adapter:
- Pydantic AI (
runtype-pydantic-ai): pass aContentOptionsobject withinput_messages,output_messages,system_instructions,tool_arguments,tool_results,tool_definitions,max_chars, and aredact(value, attribute_name)callback. - Flue (
@runtypelabs/flue-otel): pass acontentobject withinputMessages,outputMessages,systemInstructions,toolArguments,toolResults,maxChars, and aredactcallback. - Pi durable binding (
@runtypelabs/pi-otel/durable): pass acontentobject withinputMessages,outputMessages,systemInstructions,toolArguments,toolResults,maxChars, and aredactcallback. - Cloudflare Agents SDK (
@runtypelabs/cloudflare-agents): pass acontentobject withmessages,instructions,tools,errors,maxBytes, and aredact(kind, value)callback.
For per-adapter caps, defaults, and redaction examples, see Instrument a supported framework and Instrument a Flue agent.
Capture conversation content
To record transcripts, observed prompts, tool definitions, text-based signals, simulations, and eval cases, enable content capture using the setting for your setup in Check what your instrumentation sends by default.
Emit content attributes from a custom agent loop
When you instrument your own loop, emit the OpenTelemetry GenAI content attributes on your spans. The following table lists each content attribute that Runtype reads and what it populates:
For framework-specific content attributes and non-content attributes, see Trace attributes.
How Runtype scrubs and bounds incoming content
When a trace arrives with content, Runtype applies credential scrubbing, size limits, and attribute filtering before storage.
Automatic credential scrubbing
Runtype scans incoming span content and text fields for credential-shaped strings and replaces each match with a [REDACTED:<TYPE>] marker before storage. The scanner matches PEM private keys, Runtype API keys, Anthropic API keys, OpenAI API keys, GitHub tokens, AWS access key IDs, Google API keys, Slack tokens, Stripe live keys, JSON Web Tokens, and Bearer tokens.
Pattern scrubbing helps protect against accidental secret leaks, but it can’t identify every secret or custom credential in free-form text. Redact sensitive values before export when you need strict control.
Content size limits
Runtype enforces three content limits: 256 KiB per attribute, 384 KiB per span, and 2 MiB per trace. Runtype drops values over a limit whole instead of truncating them, and splitting a trace across exporter batches doesn’t reset the trace limit. For all ingest limits, see Limits and pricing.
Attributes that Runtype removes or discards
Logs shows content in its own fields, not in the raw span attributes. Runtype discards some framework attributes it doesn’t use, such as retrieved documents and embeddings, and stores them nowhere.
Apply logging privacy settings to external agents
Two agent settings control how Runtype handles incoming telemetry after it arrives: Verbose logging (config.loggingPolicy) and personally identifiable information (PII) redaction (config.piiRedaction). Runtype reads both settings from the receiving agent, which is the agent Runtype created for your gen_ai.agent.name:
- Verbose logging defaults to On. Change it on the agent’s Logging settings page under Verbose logging (Inherit from surface, On, or Off), or through the API on
config.loggingPolicy(default,on, oroff). - PII redaction defaults to Off. Change it through the API on
config.piiRedaction(default,off, orredact).
If a trace sent with a product ingest key spans multiple agents, Runtype applies the strictest setting among those agents. OpenTelemetry Protocol (OTLP) logs follow the same agent settings. To store OTLP logs, set runtype.agent.id on the logs resource or send the x-runtype-agent-id header. Without either, Runtype accepts the request and discards the records. Runtype doesn’t store OTLP metrics.
Turn verbose logging off
To stop Runtype from storing verbose trace and log details for an agent, open the agent’s Logging settings page and set Verbose logging to Off. You can also set config.loggingPolicy to "off" through PUT /v1/agents/{id}.
When Verbose logging is Off, Logs omits each model call’s prompts and outputs, omits span details for this agent, and shows Verbose logging off. Features that need text (observed prompts, text-based signals, and simulations) stop working for that agent.
On Runs, the top-level transcript, final output, and tool parameters still reflect what your exporter sent. To keep content out of Runtype completely, turn off content capture in your instrumentation.
Turn PII redaction on
To mask personal data on an external agent, send a PUT request to update config.piiRedaction:
Replace the following:
agent_YOUR_AGENT_ID: the ID of the receiving agent. Find it on the agent’s page in the dashboard, or ask your coding agent to callget_status.rt_YOUR_API_KEY: a Runtype API key with theAGENTS:WRITEorAGENTS:UPDATEscope.
When config.piiRedaction is redact, Runtype masks personal data in Logs and in the run’s transcript, final output, and tool payloads. It detects emails, phone numbers, card numbers, and national ID and bank numbers. Runtype also suppresses span-level content, observed prompt text, observed tool definitions, and text-based signals for that agent. For full PII detection rules and policy precedence, see Logging policy and PII redaction.
Conversation and end-user IDs
Use opaque identifiers for conversation IDs and end-user IDs rather than personal data or credentials. If scrubbing or PII redaction changes an ID, Runtype replaces it with a stable digest instead of storing the raw value.
Verify what your traces carry
After you change a content or privacy setting, send one test run and confirm what Runtype recorded:
- Run your agent once in development so it exports a trace.
- Run
npx @runtypelabs/connect check, or ask your coding agent to callcheck_first_trace. Confirm that the content check matches your configuration: it passes when you capture content, warns and makes the statusdegradedwhen you declare content withheld, and reports missing or suppressed content otherwise. - Open the run in Runs, or inspect it through Runtype Connect, to confirm which fields are stored. Reading or searching a run through Runtype Connect loads full span content by default only for runs outside production. Production runs omit full content unless you pass
includeContent: true.
Next steps
Continue with one of these pages:
- Read traces and runs: inspect recorded runs and control when full content loads.
- Send a first trace: run the first-trace check and resolve missing content or attribution.
- Instrument a supported framework: configure telemetry and adapters for your framework.
- Instrument a Flue agent: set per-kind content switches and redaction for Flue.
- Trace attributes: review every span and resource attribute that Runtype reads.
- Logging policy and PII redaction: review logging policy options, precedence rules, and PII detection formats.