Skip to main content
Two settings control what leaves your app. Capture selects which content is exported: 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.
redacted=false overrides the capture setting. Every capture mode then exports the original content, so metadata with false is not a metadata-only setting. If you want metadata only, keep redaction on.

Choosing a mode

The default is text, 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 use metadata 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 in BOTGAUGE_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. Set BOTGAUGE_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.

Try BotGauge →

Spans sent without the SDK

Spans forwarded through a plain OTLP exporter or an OpenTelemetry Collector reach BotGauge exactly as your instrumentation produced them, and nothing is masked. Use the SDK when you need masking. See Any OTLP exporter.