Back to stories
Software Bugs

Deployed to prod with debug=True. Claude logged every single token. Every. Single. One.

Quick one. We use Anthropic Claude via their API for a customer-facing feature — a document summarizer.

We have a staging environment and a prod environment. In staging we had verbose logging enabled that printed the full prompt and response for every call. Great for debugging.

Guess what I forgot to turn off before the Friday afternoon deploy.

We process about 8,000 documents per day in prod. Each prompt is roughly 3,000 tokens. Each response another 800.

Over the weekend our logging bill (we use Datadog) went from ~$12/day to ~$890/day because we were dumping 30MB of token text per minute into the log stream.

Monday morning standup was fun.

The PR that fixed it was literally one line: `debug=False`