You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ai): Redact base64 data URLs in image_url content blocks (#5953)
Extend `redact_blob_message_parts` to detect and redact base64 data URLs
inside `image_url` content blocks (e.g. `data:image/jpeg;base64,...`),
in addition to the existing `blob` type handling.
Some AI integrations send image content as `image_url` items with inline
base64 data URLs rather than the `blob` content type. Without this
change, those base64 payloads are sent as span data, which inflates
event size and can leak image content.
Also moves `DATA_URL_BASE64_REGEX` from
`sentry_sdk/integrations/pydantic_ai/consts.py` to
`sentry_sdk/ai/consts.py` since it's now shared across AI monitoring
code beyond pydantic_ai.
Fixes PY-2280 and #5948
0 commit comments