Skip to content

docs(ai): Document stripping inline media from agent messages#18599

Draft
obostjancic wants to merge 3 commits into
masterfrom
ognjenbostjancic/tet-2569-document-how-to-strip-media-in-agent-monitoring
Draft

docs(ai): Document stripping inline media from agent messages#18599
obostjancic wants to merge 3 commits into
masterfrom
ognjenbostjancic/tet-2569-document-how-to-strip-media-in-agent-monitoring

Conversation

@obostjancic

Copy link
Copy Markdown
Member

Adds a "Stripping Images and Media from Messages" section to the AI agent monitoring Data Privacy page. AI messages can embed inline media (base64 images, audio, files) that may hold sensitive information, and the SDK does not strip it by default.

The new section documents a beforeSendSpan example that walks the gen_ai.input.messages, gen_ai.output.messages, and gen_ai.system_instructions attributes and replaces inline media with a placeholder, preserving roles, text, and tool calls. Media is detected by the value's shape (data: URIs and large base64 blobs) rather than provider-specific field names, so it works across OpenAI, Anthropic, Google, and Vercel AI SDK shapes and leaves plain text and http(s) URLs untouched.

Refs TET-2569

AI agent messages can carry inline media (base64 images, audio, files)
that may hold sensitive information. The SDK does not strip this by
default, so document a beforeSendSpan example that replaces inline media
with a placeholder while preserving the rest of the conversation.

Refs TET-2569
@linear-code

linear-code Bot commented Jun 30, 2026

Copy link
Copy Markdown

TET-2569

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jun 30, 2026 12:45pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jun 30, 2026 12:45pm

Request Review

Make isInlineMedia the clear customization point and drop the base64
implementation trivia from the comments, so readers focus on adapting
the matching logic to their own provider.

Refs TET-2569
Frame the section around scrubbing data before it's sent, matching the
phrasing used elsewhere in the privacy docs, instead of calling out what
the SDK does not do by default.

Refs TET-2569
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant