metadata, text, or full. Redaction decides whether detected PII and credentials are masked.
With botgauge instrument, set BOTGAUGE_CAPTURE and BOTGAUGE_REDACTED. With tracing.init(), pass capture= and redacted=.
app.py
What each combination exports
BotGauge ran all six combinations on a LangChain prompt that contained an email address and a card number.Choosing a mode
The default istext, which exports prompts, responses, and tool data, but no images, audio, or embedding vectors. That matches how most tracing platforms treat media. Choose full to export images and audio inline. For a text-only agent, text and full exported the same content in BotGauge’s test.
Choose metadata when prompts can contain data you can’t send off your infrastructure. You keep model names, token counts, finish reasons, and timing, which is enough to compute cost and latency.
An unrecognized BOTGAUGE_CAPTURE value falls back to metadata with a warning.
Masking has limits
Masking catches common formats like email addresses and card numbers. It does not catch every possible sensitive value. Treat it as a safety net, and usemetadata capture for data you must never export.
String values that BotGauge protects are capped at 4096 characters.
Allow extra attribute keys
BotGauge filters span attributes by default. To keep additional keys, list them inBOTGAUGE_CAPTURE_ALLOW_KEYS as a comma-separated list. Globs are allowed, and the list is merged with the capture_allow_keys= argument.
terminal
Infrastructure spans
By default BotGauge filters infrastructure spans such as HTTP and database calls. SetBOTGAUGE_TRACE_SCOPE=all to export them in full.
Tune capture and redaction
Open BotGauge to see how your spans appear, then adjust capture and redaction in your app.
.png?fit=max&auto=format&n=rExdh2xAS2_ywWU5&q=85&s=2336659947d2543be68f95bf2d539b85)