Notice: The Weights & Biases domain will change on September 30. This includes all websites and services that use a W&B domain. No action is needed today.
Automatically redact Personally Identifiable Information from traces
This feature is only accessible through the Python SDK.
Some organizations process Personally Identifiable Information (PII) such as names, phone numbers, and email addresses in their Large Language Model (LLM) workflows. Storing this data in W&B Weave poses compliance and security risks. Stripping this data before you log it helps keep your agent compliant with policies like GDPR and HIPAA.The Sensitive Data Protection feature lets you automatically redact Personally Identifiable Information (PII) from a trace before Weave sends it to Weave servers. This feature integrates Microsoft Presidio into the Weave Python SDK, so you can control redaction settings at the SDK level.The Sensitive Data Protection feature introduces the following functionality to the Python SDK:
A redact_pii setting, which you can enable or disable in the weave.init() call to turn on PII redaction.
Automatic redaction of common entities when redact_pii = True.
Customizable redaction fields with the configurable redact_pii_fields setting.
Exclusion of specific entities from redaction with the redact_pii_exclude_fields setting.
Enable PII redaction
This section walks you through installing the required dependencies, turning on PII redaction in weave.init(), and optionally tailoring which entities Weave redacts. To get started with the Sensitive Data Protection feature in Weave, complete the following steps:
Optional: Exclude specific entities from redaction with the redact_pii_exclude_fields parameter. This is useful when you want to keep the default redaction but preserve certain entity types. The following example shows how to redact all default entities except EMAIL_ADDRESS and PERSON:
After you complete these steps, Weave redacts the configured PII entities from traces before sending them to Weave servers.
Entities redacted by default
This section lists the PII entity types that Weave redacts automatically when you enable PII redaction without specifying redact_pii_fields. Weave automatically redacts the following entities when you enable PII redaction:
CREDIT_CARD
CRYPTO
EMAIL_ADDRESS
ES_NIF
FI_PERSONAL_IDENTITY_CODE
IBAN_CODE
IN_AADHAAR
IN_PAN
IP_ADDRESS
LOCATION
PERSON
PHONE_NUMBER
UK_NHS
UK_NINO
US_BANK_NUMBER
US_DRIVER_LICENSE
US_PASSPORT
US_SSN
Redact sensitive keys with REDACT_KEYS
In addition to PII redaction, the Weave SDK supports redaction of custom keys with REDACT_KEYS. This is useful when you want to protect additional sensitive data that might not fall under the PII category but must remain private. Examples include:
API keys
Authentication headers
Tokens
Internal IDs
Config values
Pre-defined REDACT_KEYS
Weave automatically redacts the following sensitive keys by default:
[ "api_key", "auth_headers", "authorization"]
Add your own keys
If your application uses other field names that contain sensitive values, you can extend the default REDACT_KEYS list. Add your own custom keys that you want to redact from traces:
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Weights \u0026 Biases Documentation","colors":{"primary":"#FCBC32","light":"#FCBC32","dark":"#FCBC32"},"logo":{"light":"https://mintcdn.com/wb-21fd5541/C7PMWo9Jl9GZ2Zki/icons/Endorsed_primary_blackwhite.svg?fit=max\u0026auto=format\u0026n=C7PMWo9Jl9GZ2Zki\u0026q=85\u0026s=a9d999235518399090dd8ddd0a9e1e4a","dark":"https://mintcdn.com/wb-21fd5541/C7PMWo9Jl9GZ2Zki/icons/Endorsed_primary_goldwhite.svg?fit=max\u0026auto=format\u0026n=C7PMWo9Jl9GZ2Zki\u0026q=85\u0026s=f4eaf37e934c12e5fd3e806fe2984c2e","href":"https://docs.wandb.ai/"},"favicon":"https://mintcdn.com/wb-21fd5541/HesivM0BUKMK8VeH/favicon.png?fit=max\u0026auto=format\u0026n=HesivM0BUKMK8VeH\u0026q=85\u0026s=0c96f60ed4edd2ece5e942ecde3c11fa","background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://app.wandb.ai/login?_gl=1*8ninq0*_ga*MTE3ODEwNDkyLjE3MzQwMjk0NjA.*_ga_JH1SJHJQXJ*MTczNDA2Mzc4OS4yLjEuMTczNDA2MzkxMC42MC4wLjA.*_ga_GMYDGNGKDT*MTczNDA2Mzc4OS4zLjEuMTczNDA2Mzg2Ny4wLjAuMA..*_gcl_au*MTc0Mjk3ODgzMi4xNzM0MDI5NDYw","label":"Log in"}],"primary":{"type":"button","label":"Sign Up","href":"https://app.wandb.ai/login?signup=true\u0026_gl=1*y15ckv*_ga*MTE3ODEwNDkyLjE3MzQwMjk0NjA.*_ga_JH1SJHJQXJ*MTczNDA2Mzc4OS4yLjEuMTczNDA2Mzk3MC42MC4wLjA.*_ga_GMYDGNGKDT*MTczNDA2Mzc4OS4zLjEuMTczNDA2Mzg2Ny4wLjAuMA..*_gcl_au*MTc0Mjk3ODgzMi4xNzM0MDI5NDYw"}},"footer":{"socials":{"discord":"https://discord.com/invite/RgB8CPk2ce","github":"https://github.com/wandb/docs","linkedin":"https://www.linkedin.com/company/wandb","x":"https://x.com/weights_biases?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor","youtube":"https://www.youtube.com/c/WeightsBiases"}},"seo":{"metatags":{"canonical":"https://docs.wandb.ai"},"indexing":"all"},"fonts":{"heading":{"family":"Source Serif 4","weight":400},"body":{"family":"Source Sans 3","weight":400}},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"ga4":{"measurementId":"G-5JYCHZZP7K"},"gtm":{"tagId":"GTM-5BL5RTH"}},"banner":{"content":"**Notice:** The Weights \u0026 Biases domain [will change on September 30](https://wandb.ai/site/domain-update-faqs/). This includes all websites and services that use a W\u0026B domain. No action is needed today.","dismissible":true,"type":"warning"},"contextual":{"options":[{"title":"Install W\u0026B MCP","description":"Set up the W\u0026B MCP server in Claude Code, Codex, VS Code and or other LLM agents.","icon":"plug","href":"/platform/mcp-server"},{"title":"Install W\u0026B MCP in Cursor","description":"Automatically install W\u0026B MCP server to Cursor. Requires a W\u0026B API key.","icon":"plug","href":"cursor://anysphere.cursor-deeplink/mcp/install?name=wandb\u0026config=eyJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9tY3Aud2l0aHdhbmRiLmNvbS9tY3AiLCJoZWFkZXJzIjp7IkF1dGhvcml6YXRpb24iOiJCZWFyZXIgWU9VUl9XQU5EQl9BUElfS0VZIiwiQWNjZXB0IjoiYXBwbGljYXRpb24vanNvbiwgdGV4dC9ldmVudC1zdHJlYW0ifX0="},"chatgpt","claude","copy","view"],"display":"header"},"navigation":{"languages":[{"language":"en","href":""},{"language":"fr","href":"fr"},{"language":"ja","href":"ja"},{"language":"ko","href":"ko"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"wb-21fd5541","hasAudioNarration":false,"actualSubdomain":"wb-21fd5541","customDomains":["docs.wandb.ai"],"gitSource":{"type":"github","owner":"wandb","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6abd16e4f7750a5210d47e77","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"en","tag":"Products","count":420},{"language":"fr","tag":"Produits","count":420},{"language":"ja","tag":"プロダクト","count":420},{"language":"ko","tag":"제품","count":420},{"language":"en","tag":"Reference","count":397},{"language":"fr","tag":"Référence","count":397},{"language":"ja","tag":"リファレンス","count":397},{"language":"ko","tag":"레퍼런스","count":397},{"language":"en","tag":"W\u0026B Weave","count":356},{"language":"fr","tag":"W\u0026B Weave","count":356},{"language":"ja","tag":"W\u0026B Weave","count":356},{"language":"ko","tag":"W\u0026B Weave","count":356},{"language":"en","tag":"W\u0026B Models","count":333},{"language":"fr","tag":"W\u0026B Models","count":333},{"language":"ja","tag":"W\u0026B Models","count":333},{"language":"ko","tag":"W\u0026B Models","count":333},{"language":"en","tag":"Guides","count":259},{"language":"fr","tag":"Guides","count":259},{"language":"ja","tag":"ガイド","count":259},{"language":"ko","tag":"가이드","count":259},{"language":"en","tag":"Service API","count":113},{"language":"fr","tag":"API de service","count":113},{"language":"ja","tag":"サービス API","count":113},{"language":"ko","tag":"서비스 API","count":113},{"language":"en","tag":"Python","count":92},{"language":"fr","tag":"Python","count":92},{"language":"ja","tag":"Python","count":92},{"language":"ko","tag":"Python","count":92},{"language":"en","tag":"TypeScript SDK","count":88},{"language":"fr","tag":"SDK TypeScript","count":88},{"language":"ja","tag":"TypeScript SDK","count":88},{"language":"ko","tag":"TypeScript SDK","count":88},{"language":"en","tag":"Trace functions with Ops and Calls","count":64},{"language":"fr","tag":"Tracer des fonctions avec des Ops et des Calls","count":64},{"language":"ja","tag":"Ops と Calls を使用して関数をトレースする","count":64},{"language":"ko","tag":"Ops와 Calls로 함수 트레이스하기","count":64},{"language":"en","tag":"Docs Home","count":62},{"language":"fr","tag":"Accueil de la documentation","count":62},{"language":"ja","tag":"ドキュメント ホーム","count":62},{"language":"ko","tag":"문서 홈","count":62}],"searchSettings":{"maxResults":25}},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false,"deflection":{"enabled":true,"email":"support@wandb.com"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"css/styles.css","content":":root{--background-light:251 250 248;--background-dark:26 29 36;--primary-foreground:217 13% 19%;--page-texture:url(\"/css/assets/light-dots.png\")}:root{--color-page-bg:#FBFAF8;--color-card-hover:#FFFFFF;--color-stroke:#DFE0E2;--color-sidebar-bg:#F9F7F3;--color-sidebar-hover:#F5EDE1;--color-card-rest:#FBFAF8;--color-card-active:#FFFFFF;--color-icon:#D4870D;--color-button:#FCBC32;--color-button-fg:#2B3038;--color-text-primary:#2B3038;--color-text-secondary:#4B535C}.dark{--color-page-bg:#1A1D24;--color-card-hover:#363C44;--color-stroke:#2B3038;--color-sidebar-bg:#20242B;--color-sidebar-hover:#2B3038;--color-card-rest:#1A1D24;--color-card-active:#2B3038;--color-icon:#D4870D;--color-button:#FCBC32;--color-text-primary:#E8E8E9;--color-text-secondary:#C5C7CC;--page-texture:url(\"/css/assets/dark-dots.png\")}:root{--font-serif:\"Source Serif 4\",\"Times New Roman\",serif;--font-sans:\"Source Sans 3\",Calibri,sans-serif;--font-weight-regular:400;--font-weight-medium:500;--font-weight-bold:650;--font-size-xs:0.75rem;--font-size-sm:0.9375rem;--font-size-md:1rem;--font-size-xm:1.125rem;--font-size-lg:1.5rem;--font-size-xl:2.5rem}body{font-family:var(--font-sans)}h1,h2,h3,h4,h5,h6{font-family:var(--font-serif);font-weight:var(--font-weight-medium)!important;color:var(--color-text-primary)!important}h1{font-size:var(--font-size-xl)}b,strong{font-weight:var(--font-weight-bold)!important;font-synthesis-weight:auto}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.5rem}h2:is([id^=january-2],[id^=february-2],[id^=march-2],[id^=april-2],[id^=may-2],[id^=june-2],[id^=july-2],[id^=august-2],[id^=september-2],[id^=october-2],[id^=november-2],[id^=december-2]){margin-top:3rem}.banner-body,.banner-body *,.banner-title{color:#e8e8e9!important}body,html{background-color:var(--color-page-bg)!important;background-image:var(--page-texture)!important;background-repeat:no-repeat!important;background-size:500px auto!important;background-position:calc(100% + 375px) 200px!important;background-attachment:fixed!important}main{background-color:transparent!important}#background-color{background-color:transparent!important}span[style*=radial-gradient]{background:0 0!important}img.nav-logo{height:62px!important;min-height:62px!important;max-height:62px!important;width:233px!important;min-width:233px!important;max-width:233px!important;flex-shrink:0!important;flex-grow:0!important}a:has(>img.nav-logo){flex-shrink:0;min-width:233px}a.nav-tabs-item.font-medium:not([data-active=true]),button.nav-tabs-item:not(.text-primary)>div:first-child{color:var(--color-text-secondary)}button.nav-tabs-item.text-primary>div:first-child svg,button.nav-tabs-item:hover>div:first-child svg{color:var(--color-text-primary)!important}.nav-tabs-item{font-size:var(--font-size-md)}[data-active=true].hover\\:text-primary:hover,[data-active=true].text-primary{color:var(--color-text-primary);text-shadow:none;font-weight:var(--font-weight-bold)}button.nav-tabs-item.text-primary,button.nav-tabs-item.text-primary>div:first-child{color:var(--color-text-primary)!important;font-weight:var(--font-weight-bold)!important}.nav-tabs-item .bg-primary{background-color:var(--color-text-primary);height:2px}.nav-dropdown-item:has(.text-primary){background-color:var(--color-sidebar-hover)}.nav-dropdown-item .text-primary{color:var(--color-text-primary);font-weight:var(--font-weight-medium)}.nav-dropdown-item.group:hover .group-hover\\:text-primary{color:var(--color-text-primary)}#assistant-entry,#assistant-entry span,#localization-select-trigger,#localization-select-trigger span,#search-bar-entry,#search-bar-entry>div>div,#topbar-cta-button a,#topbar-cta-button a span,.topbar-right-container nav,.topbar-right-container nav a{font-size:var(--font-size-sm)}#topbar-cta-button a,#topbar-cta-button a span,#topbar-cta-button a svg{color:var(--color-button-fg)}#assistant-entry{background-color:var(--color-button)!important}#assistant-entry:hover{background-color:var(--color-button)!important;opacity:.9}#assistant-entry,#assistant-entry span,#assistant-entry svg{color:var(--color-button-fg)!important}#banner,#banner *{color:var(--color-button-fg)!important}button[aria-label=\"Dismiss banner\"] svg{stroke:var(--color-button-fg)!important}#sidebar,#sidebar-content{background-color:var(--color-sidebar-bg)}.sidebar-group-header,.sidebar-group-header>h5{font-family:var(--font-sans)!important;font-size:var(--font-size-md);font-weight:var(--font-weight-medium)!important}.sidebar-group a,.sidebar-group button{font-family:var(--font-sans);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium)}#sidebar-content a.text-primary{color:var(--color-text-primary);background-color:var(--color-sidebar-hover);text-shadow:none}.nav-tag-pill-text{color:var(--color-text-secondary)}#sidebar-content .sidebar-group a .justify-end{flex:none}.toc-item[data-active=true]>a,.toc-item[data-active=true]>a:hover{color:var(--color-text-primary);border-color:var(--color-text-primary)}.colab-link,.github-source-link,.try-product-link{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 14px;border:1px solid color-mix(in srgb,var(--color-stroke) 70%,transparent);border-radius:12px;font-size:var(--font-size-md);font-weight:var(--font-weight-regular);font-family:var(--font-sans);color:var(--color-text-secondary);background-color:color-mix(in srgb,var(--color-card-hover) 50%,transparent);text-decoration:none;line-height:24px;white-space:nowrap;cursor:pointer;transition:all .2s ease;margin-bottom:1.5rem;width:fit-content;min-width:fit-content}.colab-link:hover,.github-source-link:hover,.try-product-link:hover{background-color:color-mix(in srgb,var(--color-card-hover) 80%,transparent);border-color:var(--color-stroke)}.dark .colab-link,.dark .github-source-link,.dark .try-product-link{color:var(--color-text-primary)}.source-link{float:right;display:inline-block;padding:2px 8px;border:1px solid color-mix(in srgb,var(--color-stroke) 70%,transparent);border-radius:6px;font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);color:var(--color-text-secondary);background-color:color-mix(in srgb,var(--color-card-hover) 50%,transparent);text-decoration:none;transition:all .15s ease}.source-link:hover{background-color:color-mix(in srgb,var(--color-card-hover) 80%,transparent);border-color:var(--color-stroke);text-decoration:none}.dark .source-link{color:var(--color-text-primary)}button[type=submit].bg-primary.mint-text-white{color:var(--color-button-fg)!important}button[type=submit].bg-primary.mint-text-white [fill=white]{fill:currentColor!important}button[type=submit].bg-primary.mint-text-white [stroke=white]{stroke:currentColor!important}button[type=submit].bg-primary.mint-text-white svg{color:var(--color-button-fg)!important}div:has(>div>textarea.chat-assistant-input):not(#chat-assistant-sheet *){box-shadow:0 8px 24px #00000026}div:has(>.chat-assistant-floating-input){overflow:visible!important}textarea.chat-assistant-input{min-height:2.5rem!important;max-height:2.5rem!important}button.chat-assistant-send-button{background-color:var(--color-button)!important}button.chat-assistant-send-button svg{color:var(--color-button-fg)!important}.product-card{background-color:var(--color-card-rest);border:1px solid var(--color-stroke)}.product-card:hover{background-color:var(--color-card-active)}.product-card-title{font-size:var(--font-size-lg);font-weight:var(--font-weight-medium)!important;margin-top:0}.home-h3,.product-card-subtitle{font-family:var(--font-sans)!important;font-size:var(--font-size-xm);font-weight:var(--font-weight-regular);color:var(--color-text-primary)}.product-card-body{font-family:var(--font-sans);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);color:var(--color-text-secondary)}.card.block{background-color:var(--color-card-rest)!important;border-color:var(--color-stroke)!important}.card.block:hover{background-color:var(--color-card-active)!important;border-color:var(--color-stroke)!important}.card.block h1,.card.block h2,.card.block h3,.card.block h4,.card.block h5,.card.block h6{font-family:var(--font-sans);font-weight:var(--font-weight-bold)!important}#pagination>a{background-color:var(--color-card-rest);border-color:var(--color-stroke)}#pagination>a:hover{background-color:var(--color-card-active);border-color:var(--color-stroke)}[data-component-part=update-label]{color:var(--color-text-secondary)}[data-badge=true][data-color=orange]{--color-bg:color-mix(in srgb, var(--color-button) 20%, transparent);--color-text:var(--color-icon);--color-bg-disabled:color-mix(in srgb, var(--color-button) 8%, transparent);--color-text-disabled:color-mix(in srgb, var(--color-icon) 50%, transparent)}[data-badge=true] a,[data-badge=true] a:hover{text-decoration:none!important;border-bottom:0!important}.dark [data-badge=true][data-color=orange]{--color-text:var(--color-button);--color-text-disabled:color-mix(in srgb, var(--color-button) 50%, transparent)}"}]}
{"page":{"pagePath":"weave/guides/tracking/redact-pii","slug":"/weave/guides/tracking/redact-pii","pageMetadata":{"title":"Redact PII from traces","description":"Automatically redact Personally Identifiable Information from traces","keywords":["PII redaction","Presidio","sensitive data protection","GDPR","HIPAA"],"href":"/weave/guides/tracking/redact-pii"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Automatically redact Personally Identifiable Information from traces\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Warning,{children:_jsx(_components.p,{children:`This feature is only accessible through the Python SDK.`})}),`\n`,_jsxs(_components.p,{children:[`Some organizations process Personally Identifiable Information (PII) such as names, phone numbers, and email addresses in their Large Language Model (LLM) workflows. Storing this data in W\u0026B Weave poses compliance and security risks. Stripping this data before you log it helps keep your agent compliant with policies like `,_jsx(_components.a,{href:`https://gdpr.eu/`,children:`GDPR`}),` and `,_jsx(_components.a,{href:`https://www.hhs.gov/hipaa/index.html`,children:`HIPAA`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.em,{children:`Sensitive Data Protection`}),` feature lets you automatically redact Personally Identifiable Information (PII) from a `,_jsx(_components.a,{href:`/weave/guides/tracking`,children:`trace`}),` before Weave sends it to Weave servers. This feature integrates `,_jsx(_components.a,{href:`https://microsoft.github.io/presidio/`,children:`Microsoft Presidio`}),` into the Weave Python SDK, so you can control redaction settings at the SDK level.`]}),`\n`,_jsx(_components.p,{children:`The Sensitive Data Protection feature introduces the following functionality to the Python SDK:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.code,{children:`redact_pii`}),` setting, which you can enable or disable in the `,_jsx(_components.code,{children:`weave.init()`}),` call to turn on PII redaction.`]}),`\n`,_jsxs(_components.li,{children:[`Automatic redaction of `,_jsx(_components.a,{href:`#entities-redacted-by-default`,children:`common entities`}),` when `,_jsx(_components.code,{children:`redact_pii = True`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Customizable redaction fields with the configurable `,_jsx(_components.code,{children:`redact_pii_fields`}),` setting.`]}),`\n`,_jsxs(_components.li,{children:[`Exclusion of specific entities from redaction with the `,_jsx(_components.code,{children:`redact_pii_exclude_fields`}),` setting.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`enable-pii-redaction`,children:`Enable PII redaction`}),`\n`,_jsxs(_components.p,{children:[`This section walks you through installing the required dependencies, turning on PII redaction in `,_jsx(_components.code,{children:`weave.init()`}),`, and optionally tailoring which entities Weave redacts. To get started with the Sensitive Data Protection feature in Weave, complete the following steps:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Install the required dependencies:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` presidio-analyzer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` presidio-anonymizer`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Modify your `,_jsx(_components.code,{children:`weave.init()`}),` call to enable redaction. When `,_jsx(_components.code,{children:`redact_pii=True`}),`, Weave `,_jsx(_components.a,{href:`#entities-redacted-by-default`,children:`redacts common entities by default`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`3`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weave`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`weave.init(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-project\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact_pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Optional: Customize redaction fields with the `,_jsx(_components.code,{children:`redact_pii_fields`}),` parameter:`]}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`weave.init(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-project\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact_pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact_pii_fields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CREDIT_CARD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"US_SSN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]})`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For a full list of the entities that can be detected and redacted, see `,_jsx(_components.a,{href:`https://microsoft.github.io/presidio/supported_entities/`,children:`PII entities supported by Presidio`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Optional: Exclude specific entities from redaction with the `,_jsx(_components.code,{children:`redact_pii_exclude_fields`}),` parameter. This is useful when you want to keep the default redaction but preserve certain entity types. The following example shows how to redact all `,_jsx(_components.a,{href:`#entities-redacted-by-default`,children:`default entities`}),` except `,_jsx(_components.code,{children:`EMAIL_ADDRESS`}),` and `,_jsx(_components.code,{children:`PERSON`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`weave.init(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-project\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact_pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact_pii_exclude_fields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EMAIL_ADDRESS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PERSON\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]})`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`After you complete these steps, Weave redacts the configured PII entities from traces before sending them to Weave servers.`}),`\n`,_jsx(Heading,{level:`2`,id:`entities-redacted-by-default`,children:`Entities redacted by default`}),`\n`,_jsxs(_components.p,{children:[`This section lists the PII entity types that Weave redacts automatically when you enable PII redaction without specifying `,_jsx(_components.code,{children:`redact_pii_fields`}),`. Weave automatically redacts the following entities when you enable PII redaction:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`CREDIT_CARD`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`CRYPTO`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`EMAIL_ADDRESS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ES_NIF`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`FI_PERSONAL_IDENTITY_CODE`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`IBAN_CODE`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`IN_AADHAAR`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`IN_PAN`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`IP_ADDRESS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LOCATION`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`PERSON`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`PHONE_NUMBER`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`UK_NHS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`UK_NINO`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`US_BANK_NUMBER`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`US_DRIVER_LICENSE`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`US_PASSPORT`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`US_SSN`})}),`\n`]}),`\n`,_jsxs(Heading,{level:`2`,id:`redact-sensitive-keys-with-redact_keys`,children:[`Redact sensitive keys with `,_jsx(_components.code,{children:`REDACT_KEYS`})]}),`\n`,_jsxs(_components.p,{children:[`In addition to PII redaction, the Weave SDK supports redaction of custom keys with `,_jsx(_components.code,{children:`REDACT_KEYS`}),`. This is useful when you want to protect additional sensitive data that might not fall under the PII category but must remain private. Examples include:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`API keys`}),`\n`,_jsx(_components.li,{children:`Authentication headers`}),`\n`,_jsx(_components.li,{children:`Tokens`}),`\n`,_jsx(_components.li,{children:`Internal IDs`}),`\n`,_jsx(_components.li,{children:`Config values`}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`pre-defined-redact_keys`,children:[`Pre-defined `,_jsx(_components.code,{children:`REDACT_KEYS`})]}),`\n`,_jsx(_components.p,{children:`Weave automatically redacts the following sensitive keys by default:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"api_key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auth_headers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"authorization\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`add-your-own-keys`,children:`Add your own keys`}),`\n`,_jsxs(_components.p,{children:[`If your application uses other field names that contain sensitive values, you can extend the default `,_jsx(_components.code,{children:`REDACT_KEYS`}),` list. Add your own custom keys that you want to redact from traces:`]}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weave`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weave.utils `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sanitize`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weave.init(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-project\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact_pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Add custom keys to redact`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sanitize.add_redact_key(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"client_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sanitize.add_redact_key(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"123\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`token `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"789\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@weave.op`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` test`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` token`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`test(client_id, token)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When you view them in the Weave UI, the values of `,_jsx(_components.code,{children:`client_id`}),` and `,_jsx(_components.code,{children:`token`}),` appear as `,_jsx(_components.code,{children:`\"REDACTED\"`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"REDACTED\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`token `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"REDACTED\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`usage-information`,children:`Usage information`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`This feature is only available in the Python SDK.`}),`\n`,_jsx(_components.li,{children:`When you enable redaction, processing time increases because of the Presidio dependency.`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Redact PII from traces","description":"Automatically redact Personally Identifiable Information from traces","keywords":["PII redaction","Presidio","sensitive data protection","GDPR","HIPAA"],"href":"/weave/guides/tracking/redact-pii"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Enable PII redaction","slug":"enable-pii-redaction","depth":2,"children":[]},{"title":"Entities redacted by default","slug":"entities-redacted-by-default","depth":2,"children":[]},{"title":"Redact sensitive keys with REDACT_KEYS","slug":"redact-sensitive-keys-with-redact_keys","depth":2,"children":[{"title":"Pre-defined REDACT_KEYS","slug":"pre-defined-redact_keys","depth":3,"children":[]},{"title":"Add your own keys","slug":"add-your-own-keys","depth":3,"children":[]}]},{"title":"Usage information","slug":"usage-information","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/wb-21fd5541/62b2917cd8d8869b/analytics.js","/_mintlify/custom/wb-21fd5541/1d706ba09a39aeb0/local-links-same-tab.js","/_mintlify/custom/wb-21fd5541/b496d1b047524c5a/dropdown-tabs-navigate.js","/_mintlify/custom/wb-21fd5541/ca910ce06377c00d/code-group-language-persist.js","/_mintlify/custom/wb-21fd5541/6e7fd8bf6d924ed7/kapa-widget.js"],"subdomain":"wb-21fd5541","siteName":"Weights \u0026 Biases Documentation","title":"Redact PII from traces - Weights \u0026 Biases Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/weave/guides/tracking/redact-pii","matchLevel":0},"fr":{"href":"/fr/weave/guides/tracking/redact-pii","matchLevel":1},"ja":{"href":"/ja/weave/guides/tracking/redact-pii","matchLevel":1},"ko":{"href":"/ko/weave/guides/tracking/redact-pii","matchLevel":1}}},"lastModified":"2026-06-11T21:32:02.194Z","originalFileLocation":"weave/guides/tracking/redact-pii.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Automatically redact Personally Identifiable Information from traces\">\u003cmeta data-mint-head name=\"application-name\" content=\"Weights \u0026amp; Biases Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Redact PII from traces - Weights \u0026amp; Biases Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Automatically redact Personally Identifiable Information from traces\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Weights \u0026amp; Biases Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.wandb.ai/weave/guides/tracking/redact-pii\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://wb-21fd5541.mintlify.site/_mintlify/api/og/v2?division=Monitor+and+collect+feedback\u0026amp;title=Redact+PII+from+traces\u0026amp;description=Automatically+redact+Personally+Identifiable+Information+from+traces\u0026amp;theme=b2b0182ac5551ece3d862622\u0026amp;signature=12674db962cf264d0745a6750d8108a7a3fc315cfa8173595d95d03d378b115a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Redact PII from traces - Weights \u0026amp; Biases Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Automatically redact Personally Identifiable Information from traces\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://wb-21fd5541.mintlify.site/_mintlify/api/og/v2?division=Monitor+and+collect+feedback\u0026amp;title=Redact+PII+from+traces\u0026amp;description=Automatically+redact+Personally+Identifiable+Information+from+traces\u0026amp;theme=b2b0182ac5551ece3d862622\u0026amp;signature=12674db962cf264d0745a6750d8108a7a3fc315cfa8173595d95d03d378b115a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/wb-21fd5541/5Z9xPfvPzDMWig23/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Weights \u0026amp; Biases Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FCBC32\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.wandb.ai/weave/guides/tracking/redact-pii\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/weave/guides/tracking/redact-pii.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.wandb.ai/weave/guides/tracking/redact-pii\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.wandb.ai/fr/weave/guides/tracking/redact-pii\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.wandb.ai/ja/weave/guides/tracking/redact-pii\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.wandb.ai/ko/weave/guides/tracking/redact-pii\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.wandb.ai/weave/guides/tracking/redact-pii\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.wandb.ai/#organization\",\"name\":\"Weights \u0026 Biases Documentation\",\"url\":\"https://docs.wandb.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/wb-21fd5541/C7PMWo9Jl9GZ2Zki/icons/Endorsed_primary_blackwhite.svg?fit=max\u0026auto=format\u0026n=C7PMWo9Jl9GZ2Zki\u0026q=85\u0026s=a9d999235518399090dd8ddd0a9e1e4a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.wandb.ai#website\",\"name\":\"Weights \u0026 Biases Documentation\",\"url\":\"https://docs.wandb.ai\",\"publisher\":{\"@id\":\"https://docs.wandb.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii#webpage\",\"url\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii\",\"name\":\"Redact PII from traces\",\"description\":\"Automatically redact Personally Identifiable Information from traces\",\"dateModified\":\"2026-06-11T21:32:02.194Z\",\"isPartOf\":{\"@id\":\"https://docs.wandb.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.wandb.ai/weave/concepts/what-is-weave\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Monitor and collect feedback\",\"item\":\"https://docs.wandb.ai/weave/guides/tracking/annotation-queues\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Redact PII from traces\",\"item\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii#article\",\"headline\":\"Redact PII from traces\",\"name\":\"Redact PII from traces\",\"description\":\"Automatically redact Personally Identifiable Information from traces\",\"url\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii\",\"mainEntityOfPage\":{\"@id\":\"https://docs.wandb.ai/weave/guides/tracking/redact-pii#webpage\"},\"dateModified\":\"2026-06-11T21:32:02.194Z\",\"keywords\":\"PII redaction, Presidio, sensitive data protection, GDPR, HIPAA\",\"publisher\":{\"@id\":\"https://docs.wandb.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.wandb.ai#website\"}}]}\u003c/script>","agentPointerHref":"/weave/guides/tracking/redact-pii.md","siteName":"Weights \u0026 Biases Documentation","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Products","menu":[{"item":"Docs Home","pages":[{"title":"Docs Home","href":""}]},{"item":"W\u0026B Models","pages":[{"title":"W\u0026B Models","href":"/models"}]},{"item":"W\u0026B Weave","pages":[{"title":"W\u0026B Weave","mode":"wide","href":"/weave"},{"group":"Get Started","pages":[{"title":"Choose an agent integration","href":"/weave/agent-integration-quickstart"},{"title":"Quickstart: Set up custom agent observability","href":"/weave/custom-agents-quickstart"},{"title":"Evaluate your AI agent with Weave","href":"/weave/agent-evals"},{"title":"Send OpenTelemetry spans to the Agents view","href":"/weave/guides/tracking/trace-agents-otel"},{"title":"Quickstart: Instrument and trace functions","mode":"wide","href":"/weave/quickstart"}]},{"group":"Guides","pages":[{"title":"What is Weave?","href":"/weave/concepts/what-is-weave"},{"group":"Trace your agents","pages":[{"group":"Integrate Weave with agents","pages":[{"title":"Google ADK","href":"/weave/guides/integrations/agents/google-adk"},{"title":"OpenAI Agents SDK","href":"/weave/guides/integrations/agents/openai-agents-sdk"},{"title":"Claude Agent SDK","href":"/weave/guides/integrations/agents/claude-agents-sdk"},{"title":"Claude Code plugin","href":"/weave/guides/integrations/agents/claude-code-harness"},{"title":"Codex plugin","href":"/weave/guides/integrations/agents/codex-harness"},{"title":"OpenClaw plugin","href":"/weave/guides/integrations/agents/openclaw-harness"},{"title":"Pi extension","href":"/weave/guides/integrations/agents/pi-dev-harness"}]},{"title":"Trace your agents","href":"/weave/guides/tracking/trace-agents"},{"title":"Send OpenTelemetry spans to the Agents view","href":"/weave/guides/tracking/trace-agents-otel"},{"title":"View agent activity","href":"/weave/guides/tracking/view-agent-activity"},{"title":"Monitor your agents with signals","href":"/weave/guides/tracking/view-agent-signals"},{"title":"Create a custom signal","href":"/weave/guides/tracking/create-custom-signal"},{"title":"Score agent turns with a remote scorer","href":"/weave/guides/tracking/remote-scorer-signals"},{"title":"Set attributes and events on agent spans","href":"/weave/guides/tracking/trace-agents-attributes"},{"title":"Batch logging for your agent","href":"/weave/guides/tracking/trace-agents-batch"},{"title":"Trace sub-agents","href":"/weave/guides/tracking/trace-sub-agents"},{"title":"Reference media in your own bucket (BYOB) using agent spans","sidebarTitle":"Reference media in your own bucket","href":"/weave/guides/tracking/agents-byob-references"}]},{"group":"Trace functions with Ops and Calls","pages":[{"group":"Integrate with your LLM provider and frameworks","pages":[{"title":"Integrations overview","href":"/weave/guides/integrations"},{"title":"Control automatic LLM call tracking","href":"/weave/guides/integrations/autopatching"},{"title":"TypeScript SDK: third-party integration guide","href":"/weave/guides/integrations/js"},{"group":"LLM Providers","pages":[{"title":"Serverless Inference","href":"/weave/guides/integrations/inference"},{"title":"Bedrock","href":"/weave/guides/integrations/bedrock"},{"title":"Anthropic","href":"/weave/guides/integrations/anthropic"},{"title":"Cerebras","href":"/weave/guides/integrations/cerebras"},{"title":"Cohere","href":"/weave/guides/integrations/cohere"},{"title":"Google","href":"/weave/guides/integrations/google"},{"title":"Groq","href":"/weave/guides/integrations/groq"},{"title":"Hugging Face Hub","href":"/weave/guides/integrations/huggingface"},{"title":"LiteLLM","href":"/weave/guides/integrations/litellm"},{"title":"Microsoft Azure","href":"/weave/guides/integrations/azure"},{"title":"MistralAI","href":"/weave/guides/integrations/mistral"},{"title":"Neon AI Gateway","href":"/weave/guides/integrations/neon"},{"title":"NVIDIA NIM","href":"/weave/guides/integrations/nvidia_nim"},{"title":"OpenAI","href":"/weave/guides/integrations/openai"},{"title":"OpenRouter","href":"/weave/guides/integrations/openrouter"},{"title":"Together AI","href":"/weave/guides/integrations/together_ai"}]},{"group":"Frameworks","pages":[{"title":"OpenAI Realtime API","href":"/weave/guides/integrations/openai-realtime-audio"},{"title":"Bedrock Agents","href":"/weave/guides/integrations/bedrock_agents"},{"title":"LangChain","href":"/weave/guides/integrations/langchain"},{"title":"LlamaIndex","href":"/weave/guides/integrations/llamaindex"},{"title":"DSPy","href":"/weave/guides/integrations/dspy"},{"title":"Instructor","href":"/weave/guides/integrations/instructor"},{"title":"CrewAI","href":"/weave/guides/integrations/crewai"},{"title":"Smolagents","href":"/weave/guides/integrations/smolagents"},{"title":"PydanticAI","href":"/weave/guides/integrations/pydantic_ai"},{"title":"Vercel AI SDK","href":"/weave/guides/integrations/vercel_ai_sdk"},{"title":"Haystack","href":"/weave/guides/integrations/haystack"},{"title":"Agno","href":"/weave/guides/integrations/agno"},{"title":"Koog","href":"/weave/guides/integrations/koog"},{"title":"AutoGen","href":"/weave/guides/integrations/autogen"},{"title":"Verdict","href":"/weave/guides/integrations/verdict"},{"title":"Verifiers","href":"/weave/guides/integrations/verifiers"},{"title":"VERL","href":"/weave/guides/integrations/verl"}]},{"group":"Protocols","pages":[{"title":"Model Context Protocol (MCP) and Weave","href":"/weave/guides/integrations/mcp"},{"title":"Send OpenTelemetry Traces to Weave","href":"/weave/guides/tracking/otel"}]},{"title":"Local Models","href":"/weave/guides/integrations/local_models"}]},{"group":"Tracing basics","pages":[{"title":"Quickstart: Instrument and trace functions","mode":"wide","href":"/weave/quickstart"},{"title":"Understand Ops, Calls, and Traces","href":"/weave/guides/tracking/tracing"},{"title":"Trace your code","href":"/weave/guides/tracking/create-call"},{"title":"Navigate the Weave Trace view","href":"/weave/guides/tracking/trace-tree"},{"title":"Compare traces and other logged information","href":"/weave/guides/tools/comparison"},{"title":"Query and export Calls","href":"/weave/guides/tracking/querying-calls"}]},{"group":"Advanced Ops","pages":[{"title":"Trace generator functions","href":"/weave/guides/tracking/trace-generator-func"},{"title":"Trace nested functions","href":"/weave/tutorial-tracing_2"},{"title":"Trace threads","href":"/weave/guides/tracking/threads"},{"title":"Customize Ops","href":"/weave/guides/tracking/ops"},{"title":"Define and log attributes","href":"/weave/guides/tools/attributes"},{"title":"Log media","href":"/weave/guides/core-types/media"},{"title":"Reference media in your own bucket (BYOB) using Weave Op","sidebarTitle":"Reference media in your own bucket","href":"/weave/guides/tracking/byob-references"},{"title":"View and customize trace display","href":"/weave/guides/tracking/view-call"},{"title":"Disable tracing","href":"/weave/guides/tracking/trace-disable"},{"title":"Write-ahead log","href":"/weave/guides/tracking/write-ahead-log"}]},{"group":"Work with Calls","pages":[{"title":"Update and delete Calls","href":"/weave/guides/tracking/update-call"},{"title":"Call schema reference","href":"/weave/guides/tracking/call-schema-reference"},{"title":"Get a handle to the Call object during execution","href":"/weave/guides/tracking/get-call-object"},{"title":"Set Call display name","href":"/weave/guides/tracking/set-call-display"}]},{"title":"Track costs","href":"/weave/guides/tracking/costs"},{"title":"Create and manage saved views","href":"/weave/guides/tools/saved-views"},{"title":"Use trace plots","href":"/weave/guides/tracking/trace-plots"},{"title":"Link a W\u0026B run to trace function calls","href":"/weave/guides/tracking/trace-to-run"},{"title":"Use Weave with W\u0026B training runs","href":"/weave/guides/tools/weave-in-workspaces"}]},{"group":"Evaluate your agents and functions","pages":[{"title":"Evaluations overview","href":"/weave/guides/core-types/evaluations"},{"title":"Build an evaluation","href":"/weave/tutorial-eval"},{"title":"Evaluate RAG applications","href":"/weave/tutorial-rag"},{"title":"Collect and track datasets","href":"/weave/guides/core-types/datasets"},{"title":"Scoring overview","href":"/weave/guides/evaluation/scorers"},{"title":"Use builtin scorers","href":"/weave/guides/evaluation/builtin_scorers"},{"title":"Evaluate using local scorers","href":"/weave/guides/evaluation/weave_local_scorers"},{"title":"Log evaluation data from your code","href":"/weave/guides/evaluation/evaluation_logger"},{"title":"Export evaluation data","href":"/weave/guides/evaluation/export_eval"},{"title":"Compare evaluations","href":"/weave/guides/evaluation/compare_evals"},{"title":"Compare and rank models","href":"/weave/guides/core-types/leaderboards"},{"title":"Map columns in datasets","href":"/weave/guides/tools/column-mapping"},{"title":"Create dynamic Leaderboards in Evaluations","href":"/weave/guides/evaluation/dynamic_leaderboards"}]},{"group":"Experiment with prompts and models","pages":[{"title":"Use the Playground to experiment with prompts","href":"/weave/guides/tools/playground"},{"title":"Compare model performance using the Evaluation Playground","href":"/weave/guides/tools/evaluation_playground"},{"title":"Add custom runtimes","href":"/weave/guides/tools/custom-runtimes"},{"title":"Learn Weave with Serverless Inference","href":"/weave/quickstart-inference"}]},{"group":"Version your work","pages":[{"title":"Tutorial: App versioning","href":"/weave/tutorial-weave_models"},{"title":"Track application versions with models","href":"/weave/guides/core-types/models"},{"title":"Create prompt objects","href":"/weave/guides/core-types/prompts"},{"title":"Store and track versions of prompts","href":"/weave/guides/core-types/prompts-version"},{"title":"Track and version objects","href":"/weave/guides/tracking/objects"}]},{"group":"Monitor and collect feedback","pages":[{"group":"Annotate","pages":[{"title":"Set up annotation queues","href":"/weave/guides/tracking/annotation-queues"},{"title":"Review items in an annotation queue","href":"/weave/guides/tracking/annotation-review"},{"title":"Collect feedback and use annotations","description":"Collect and analyze feedback for LLM applications through UI and SDK","href":"/weave/guides/tracking/feedback"}]},{"title":"Redact PII from traces","href":"/weave/guides/tracking/redact-pii"},{"title":"Monitor using built-in signals","description":"W\u0026B provides built-in scoring solutions for agents in production","href":"/weave/guides/evaluation/monitors"},{"title":"Set up custom monitors","href":"/weave/guides/evaluation/custom-monitors"},{"title":"Score Calls with remote scorers","href":"/weave/guides/evaluation/remote-scorers"},{"title":"Set up automations","href":"/weave/guides/evaluation/automations"},{"title":"Set up guardrails","href":"/weave/guides/evaluation/guardrails"}]},{"group":"Deploy and scale","pages":[{"title":"Deployment options and security features","href":"/weave/guides/platform"},{"title":"Set up a self-managed W\u0026B Weave instance","href":"/weave/guides/platform/weave-self-managed"},{"title":"Configure ingest sampling for Weave Self-Managed","href":"/weave/guides/platform/ingest-sampling"},{"title":"Server response caching","href":"/weave/guides/platform/server-caching"}]},{"title":"Manage Weave projects","href":"/weave/guides/platform/weave-projects"},{"title":"Configure Weave environment variables","href":"/weave/guides/core-types/env-vars"}]},{"group":"Cookbooks","pages":[{"title":"Overview","mode":"wide","href":"/weave/cookbooks"},{"group":"Weave fundamentals","pages":[{"title":"Introduction to Traces","href":"/weave/cookbooks/Intro_to_Weave_Hello_Trace"},{"title":"Introduction to Evaluations","href":"/weave/cookbooks/Intro_to_Weave_Hello_Eval"}]},{"group":"Evaluations \u0026 Datasets","pages":[{"title":"Leaderboard Quickstart","href":"/weave/cookbooks/leaderboard_quickstart"},{"title":"HuggingFace Dataset Evaluations","href":"/weave/cookbooks/hf_dataset_evals"},{"title":"Import from CSV","href":"/weave/cookbooks/import_from_csv"}]},{"group":"Models \u0026 Prompts","pages":[{"title":"Use Weave with W\u0026B Models","href":"/weave/cookbooks/Models_and_Weave_Integration_Demo"},{"title":"Chain Of Density","href":"/weave/cookbooks/chain_of_density"},{"title":"DSPy Prompt Optimization","href":"/weave/cookbooks/dspy_prompt_optimization"},{"title":"Not Diamond custom routing","href":"/weave/cookbooks/notdiamond_custom_routing"}]},{"group":"Advanced Topics","pages":[{"title":"Multi-agent structured output","href":"/weave/cookbooks/multi-agent-structured-output"},{"title":"Codegen","href":"/weave/cookbooks/codegen"},{"title":"Trace and Evaluate a Computer Vision Pipeline with Weave","href":"/weave/cookbooks/ocr-pipeline"},{"title":"Audio with Weave","href":"/weave/cookbooks/audio_with_weave"}]},{"group":"Production \u0026 Monitoring","pages":[{"title":"Online Monitoring","href":"/weave/cookbooks/online_monitoring"},{"title":"Feedback Prod","href":"/weave/cookbooks/feedback_prod"},{"title":"Scorers as guardrails","href":"/weave/cookbooks/scorers_as_guardrails"},{"title":"Custom Model Cost","href":"/weave/cookbooks/custom_model_cost"},{"title":"PII Data Handling","href":"/weave/cookbooks/pii"}]}]},{"group":"Reference","pages":[{"title":"Python SDK","url":"/weave/reference/python-sdk","href":"/weave/ref-link-python"},{"title":"TypeScript SDK","url":"/weave/reference/typescript-sdk","href":"/weave/ref-link-typescript"},{"title":"Service API","url":"/weave/reference/service-api","href":"/weave/ref-link-service-api"}]},{"group":"Details \u0026 Support","pages":[{"title":"Limits and expected behaviors","href":"/weave/details/limits"},{"title":"Support: Weave","url":"/support/weave","href":"/weave/details/support-weave"}]}]},{"item":"Serverless Inference","pages":[{"title":"Serverless Inference","href":"/inference"}]},{"item":"Serverless Training","pages":[{"title":"Serverless Training","href":"/serverless-training"}]},{"item":"Serverless Sandboxes","pages":[{"title":"Serverless Sandboxes","href":"/sandboxes"}]}]},{"tab":"Get Started","pages":[{"title":"Get Started","href":"/get-started"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/release-notes"}]},{"tab":"Support","menu":[{"item":"Support Home","pages":[{"title":"Support Home","href":"/support"}]},{"item":"W\u0026B Models","pages":[{"title":"W\u0026B Models","href":"/support/models"}]},{"item":"W\u0026B Weave","pages":[{"title":"W\u0026B Weave","href":"/support/weave"}]},{"item":"Serverless Inference","pages":[{"title":"Serverless Inference","href":"/support/inference"}]}],"pages":[{"title":"Support","href":"/support"}]},{"tab":"W\u0026B Launch","hidden":true,"pages":[{"title":"W\u0026B Launch","href":"/platform/launch"}]},{"tab":"Support: W\u0026B Models","hidden":true,"pages":[{"title":"Support: W\u0026B Models","href":"/support/models"}]},{"tab":"Support: W\u0026B Weave","hidden":true,"pages":[{"title":"Support: W\u0026B Weave","href":"/support/weave"}]},{"tab":"Support: W\u0026B Inference","hidden":true,"pages":[{"title":"Support: W\u0026B Inference","href":"/support/inference"}]}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/weave/guides/tracking/redact-pii"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/weave/guides/tracking/redact-pii"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/weave/guides/tracking/redact-pii"}]}]},"basePath":"","title":"Redact PII from traces - Weights \u0026 Biases Documentation","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["10e4515597"],"chunks":["BannerMarkdown-CVKwuln2.js","dist-CXMB3QQU.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}