Skip to content

feat: record upstream response headers in debug traces#515

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
pi/issue-444-1779373997908
Open

feat: record upstream response headers in debug traces#515
github-actions[bot] wants to merge 1 commit into
mainfrom
pi/issue-444-1779373997908

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Closes #444

Records upstream provider HTTP response headers into the debug trace log when tracing is enabled, and surfaces them on the Debug Logs page.

Backend

  • Added responseHeaders column to the debug_logs schema (SQLite + Postgres).
  • Dispatcher now extracts response headers from the upstream fetch response for both streaming and non-streaming paths and stores them via DebugManager.addResponseHeaders().
  • DebugManager persists responseHeaders in the in-memory log record and flushes it to the DB via UsageStorageService.

Frontend

  • Added a Response Headers accordion panel on the Debug Logs detail view (yellow header, collapsible, with fold/copy actions like the other panels).
  • Included responseHeaders in the Copy All JSON export and the Download payload.

Tests

  • All existing backend tests pass (49 files, 404 tests).
  • Formatting verified via bun run format:check.
  • Frontend build succeeds.

@micookie2
Copy link
Copy Markdown
Contributor

I have another solution: record the request and response headers and status codes. I'll submit it later. @mcowger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perhaps I need to see the HTTP header information in the Trace logs.

1 participant