How do I capture prompts and completions without leaking PII?

Turn on the opt-in gen_ai.input.messages and gen_ai.output.messages attributes, then redact before export: the spec marks both opt-in specifically because they’re likely to carry PII, but it doesn’t redact anything on your behalf, so what actually leaves your traces is still yours to control. The spec allows an instrumentation to filter or truncate that content before it’s captured, but that’s optional per library, not a guarantee you can build on across frameworks.

The reliable point to redact is wherever content leaves the process, commonly a rule in the OpenTelemetry Collector’s redaction processor matching known patterns, an email address, a key prefix, before the batch exports. That only catches what the rule was written to look for, so check it against your own traffic’s actual shape rather than trusting a generic pattern list: a customer ID sitting mid-sentence in a chat transcript doesn’t look like the PII a default rule expects.

sources

keep reading

More on this.

Two ways to run Tessary.

Tessary is an open-source agent reliability platform. Cloud and self-hosted run the same workflow on the OpenTelemetry traces your agent already emits.

Tessary Cloud

We host it for you. Send your first trace with nothing to deploy and no model key.

what's includedper organization
traces
10,000 per calendar month
stored trace data
1 GB
retention
30 days
model credit
$10, one-time, for triage and root-cause analysis
credit card
not required

Self-hosted Tessary

Run the open-source code on your own infrastructure with one command. Add your own model key for triage and root-cause analysis.

Self-host Tessary for me by following https://github.com/tessaryai/tessary/blob/main/setup.md

docker compose -f oci://docker.io/tessaryai/tessary:compose up -d -y