LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithanonymizercreateSecretAnonymizer
Function●Since v0.8

createSecretAnonymizer

Copy
createSecretAnonymizer(options: __type): (data: T) => T
View source on GitHub

Parameters

NameTypeDescription
options__type

Example

Build an anonymizer pre-loaded with DEFAULT_SECRET_RULES suitable for passing to new Client({ anonymizer }). It redacts detected secrets from run inputs, outputs, and metadata client-side, before they are uploaded.

Copy
import { Client } from "langsmith";
import { createSecretAnonymizer } from "langsmith/anonymizer";

const client = new Client({ anonymizer: createSecretAnonymizer() });