---
title: "Comment by X1Y1 on \"AI Agent Evaluation: Test Cases, Traces, Metrics, and Improvement\" | Hashnode"
description: "The line about sanitizing traces deserves more space than it gets. Traces are where API keys end up, because tool call arguments and headers get logged as-is, a"
url: "https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0c6398a57672f677bfcf7a"
---

[Discussion](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8)

Comment [AI Agent Evaluation: Test Cases, Traces, Metrics, and Improvement](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8)

[X1Y1](https://hashnode.com/@x1y1)

[13h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0c6398a57672f677bfcf7a)

The line about sanitizing traces deserves more space than it gets. Traces are where API keys end up, because tool call arguments and headers get logged as-is, and the tracing backend usually has wider access than the app does.

[Santosh](https://hashnode.com/@sant-sh)

[1h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0c6398a57672f677bfcf7a#reply-6b0d0e78d4d0dccbe1429b8f)

Agreed, the sanitization point needs more emphasis. I would filter before exporting traces, maybe using an allowlist of required fields rather than logging everything and redacting afterward.
