Back to feed
Dev.to
Dev.to
7/17/2026
A Tiny LLM Request Recorder I Use to Reproduce Production Failures

A Tiny LLM Request Recorder I Use to Reproduce Production Failures

Short summary

A lightweight Node.js fetch wrapper that records LLM API requests for debugging and replay without requiring a full observability platform. It captures request ID, timestamp, URL, model, sanitized body, HTTP status, and raw response while deliberately redacting Authorization headers and prompt content by default. Full payload capture must be explicitly enabled to avoid storing sensitive production prompts.

  • Custom fetch wrapper records LLM requests with unique IDs, timing, and sanitized bodies
  • API keys and prompt content are redacted by default; full capture is opt-in
  • No external dependencies; runs on Node.js 18+ and saves recordings as JSON files

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more