Skip to navigation

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:

InstrumentationContent by defaultHow to change it
Vercel AI SDK (versions 5, 6, and 7)OnSet recordInputs: false and recordOutputs: false in telemetry (version 7) or experimental_telemetry (versions 5 and 6).
LangGraph (openinference-instrumentation-langchain)OnSet OPENINFERENCE_HIDE_INPUTS=true to hide inputs, and see the OpenInference documentation to hide outputs too.
OpenAI Agents SDK (openinference-instrumentation-openai-agents)OnSet OPENINFERENCE_HIDE_INPUTS=true to hide inputs, and see the OpenInference documentation to hide outputs too.
OpenAI Agents SDK for TypeScript (@openai/agents trace processor)On (traceIncludeSensitiveData defaults to true)Set traceIncludeSensitiveData: false in the run configuration; model spans then carry no messages.
Mastra (@mastra/otel-exporter)OnFilter content attributes in your observability pipeline before export.
eve (otelIntegration from eve/instrumentation/otel)On in development and for public conversations; metadata only for other production conversationsSet tracePolicy in otel() in agent/instrumentation/otel.ts.
Pydantic AI (OpenTelemetry InstrumentationSettings)On in the Connect setup (include_content=True)Set include_content=False on InstrumentationSettings.
Pydantic AI (runtype-pydantic-ai)OnPass content=False or a ContentOptions object to instrument() or span_processor().
Flue (@runtypelabs/flue-otel)OnPass content: false or a content object to createRuntypeFlueInstrumentation().
Flue on Cloudflare Workers (@flue/runtime/cloudflare)OnRegister instrument(createCloudflareTracing({ content: false })).
OpenClaw (@runtypelabs/openclaw-adapter)OffSet RUNTYPE_CAPTURE_CONTENT=true (with conversation hooks granted) to send content, or false to omit it.
Hermes (hermes-runtype-otel)Controlled by RUNTYPE_OTEL_CAPTURE_CONTENTSet RUNTYPE_OTEL_CAPTURE_CONTENT=true to send content, or false for metadata-only traces, in the Hermes gateway or CLI environment.
Pi coding agent (@runtypelabs/pi-otel/coding-agent)OffSet RUNTYPE_CAPTURE_CONTENT=true to send content, or omit it for metadata only.
Pi durable binding (@runtypelabs/pi-otel/durable)OnPass content: false or a content object to observePiDurable().
Cloudflare Agents SDK (Workers Observability)OffPass { storeMessages: true, storeTools: true } to wrapAISDK().
Cloudflare Agents SDK (@runtypelabs/cloudflare-agents)OffEnable messages, instructions, tools, or errors in the content option.
Custom agent loopOff unless your code sets content attributesEmit the gen_ai.* content attributes on your spans, or set OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true for OpenTelemetry generative AI (GenAI) instrumentations.

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: false and recordOutputs: false in telemetry. On AI SDK 5 and 6, pass the same fields in experimental_telemetry. The following example disables both fields on AI SDK 7:

    Vercel AI SDK 7
    const result = await generateText({
    model,
    prompt,
    telemetry: {
    functionId: 'support-agent',
    recordInputs: false,
    recordOutputs: false,
    },
    })

    In this example, model and prompt belong to your application.

  • LangGraph and OpenAI Agents SDK (OpenInference): set OPENINFERENCE_HIDE_INPUTS=true in 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: false in the run configuration. The SDK then leaves inputs and outputs off its model spans, so the trace processor sends none to Runtype.

  • eve: set tracePolicy in otel() in agent/instrumentation/otel.ts. Return recordInputs: false and recordOutputs: false for the conversations to withhold. The policy sets the most content any destination receives, Runtype included.

  • Pydantic AI: set include_content=False on InstrumentationSettings when you use standard OpenTelemetry. When you use runtype-pydantic-ai, pass content=False to instrument(), as shown in the following example:

    Pydantic AI adapter
    import runtype_pydantic_ai
    runtype_pydantic_ai.instrument(content=False)

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:

.env
RUNTYPE_CONTENT=withheld
Python
resource=Resource.create({
"deployment.environment.name": os.environ.get("RUNTYPE_ENVIRONMENT", "development"),
**({"runtype.content.capture": os.environ["RUNTYPE_CONTENT"]} if "RUNTYPE_CONTENT" in os.environ else {}),
})
TypeScript
resourceFromAttributes({
'deployment.environment.name': process.env.RUNTYPE_ENVIRONMENT ?? 'development',
...(process.env.RUNTYPE_CONTENT ? { 'runtype.content.capture': process.env.RUNTYPE_CONTENT } : {}),
})

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 a ContentOptions object with input_messages, output_messages, system_instructions, tool_arguments, tool_results, tool_definitions, max_chars, and a redact(value, attribute_name) callback.
  • Flue (@runtypelabs/flue-otel): pass a content object with inputMessages, outputMessages, systemInstructions, toolArguments, toolResults, maxChars, and a redact callback.
  • Pi durable binding (@runtypelabs/pi-otel/durable): pass a content object with inputMessages, outputMessages, systemInstructions, toolArguments, toolResults, maxChars, and a redact callback.
  • Cloudflare Agents SDK (@runtypelabs/cloudflare-agents): pass a content object with messages, instructions, tools, errors, maxBytes, and a redact(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:

SpanAttributeResult
invoke_agent or model call (chat)gen_ai.input.messagesThe run’s transcript and model-call input.
invoke_agent or model call (chat)gen_ai.system_instructionsThe transcript’s system turn and model-call instructions.
invoke_agent or model call (chat)gen_ai.output.messagesThe run’s final output and model-call output.
Model call (chat)gen_ai.tool.definitionsThe tool schemas offered to that model call.
Tool call (execute_tool)gen_ai.tool.call.argumentsA tool call’s input parameters.
Tool call (execute_tool)gen_ai.tool.call.resultA tool call’s result.

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, or off).
  • PII redaction defaults to Off. Change it through the API on config.piiRedaction (default, off, or redact).

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:

Enable PII redaction on an agent
curl -X PUT https://api.runtype.com/v1/agents/agent_YOUR_AGENT_ID \
-H "Authorization: Bearer rt_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "config": { "piiRedaction": "redact" } }'

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 call get_status.
  • rt_YOUR_API_KEY: a Runtype API key with the AGENTS:WRITE or AGENTS:UPDATE scope.

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:

  1. Run your agent once in development so it exports a trace.
  2. Run npx @runtypelabs/connect check, or ask your coding agent to call check_first_trace. Confirm that the content check matches your configuration: it passes when you capture content, warns and makes the status degraded when you declare content withheld, and reports missing or suppressed content otherwise.
  3. 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: