Skip to content

fix: remove production debug logs - #1910

Merged
steebchen merged 1 commit into
mainfrom
remove-prod-verbose-logs
Mar 28, 2026
Merged

steebchen merged 1 commit into
mainfrom
remove-prod-verbose-logs

Conversation

@steebchen

@steebchen steebchen commented Mar 28, 2026

Copy link
Copy Markdown
Member

Summary

  • remove temporary region-resolution and OpenAI stream debug logging from gateway paths
  • stop dumping full Stripe webhook payloads and log only event id/type
  • drop per-log worker processing info that would spam production logs

Verification

  • pnpm build
  • pnpm format (fails in packages/actions due pre-existing lint errors unrelated to this change)

Summary by CodeRabbit

Release Notes

  • Chores
    • Optimized internal system telemetry and event tracking across API, gateway, and worker services for improved operational efficiency.

Copilot AI review requested due to automatic review settings March 28, 2026 16:21
@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 83210c98-72aa-4405-8589-6236aae1c40c

📥 Commits

Reviewing files that changed from the base of the PR and between 8a0634a and 48ea8f0.

📒 Files selected for processing (6)
  • apps/api/src/stripe.ts
  • apps/gateway/src/chat/chat.ts
  • apps/gateway/src/chat/tools/resolve-provider-context.ts
  • apps/gateway/src/chat/tools/transform-streaming-to-openai.ts
  • apps/worker/src/worker.ts
  • packages/actions/src/validate-provider-key.ts
💤 Files with no reviewable changes (5)
  • packages/actions/src/validate-provider-key.ts
  • apps/gateway/src/chat/tools/resolve-provider-context.ts
  • apps/worker/src/worker.ts
  • apps/gateway/src/chat/tools/transform-streaming-to-openai.ts
  • apps/gateway/src/chat/chat.ts

Walkthrough

This PR removes debug and info-level logging statements across API, gateway, and worker services while refactoring Stripe webhook logging to use structured logging instead of JSON serialization. No functional logic or control flow is changed.

Changes

Cohort / File(s) Summary
Stripe webhook logging refactor
apps/api/src/stripe.ts
Changed webhook logging from full JSON serialization to structured logging with only eventId and eventType fields.
Debug/region logging removal
apps/gateway/src/chat/chat.ts, apps/gateway/src/chat/tools/resolve-provider-context.ts, apps/gateway/src/chat/tools/transform-streaming-to-openai.ts, packages/actions/src/validate-provider-key.ts
Removed region-debug and provider-context debug logging statements that reported routing, endpoint resolution, and streaming chunk details during request processing.
Info logging removal
apps/worker/src/worker.ts
Removed per-log info entries that reported progress during batch log processing in batchProcessLogs().

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

auto-merge

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: remove production debug logs' directly and clearly summarizes the primary change across all files in the changeset—removal of debug/info logging statements from production code paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-prod-verbose-logs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes high-volume/verbose debug logging from gateway, worker, and API webhook paths to reduce production log noise and avoid dumping sensitive/large payloads.

Changes:

  • Removed temporary region-resolution debug logs from gateway and provider key validation flows.
  • Removed OpenAI streaming debug logs that serialized full event payloads.
  • Reduced Stripe webhook logging to only event id/type and removed per-log worker “Processing log” spam.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/actions/src/validate-provider-key.ts Removes region-debug info logs during provider key validation.
apps/worker/src/worker.ts Removes per-log “Processing log” info logging to avoid production spam.
apps/gateway/src/chat/tools/transform-streaming-to-openai.ts Removes verbose OpenAI streaming debug logs that included full serialized event data.
apps/gateway/src/chat/tools/resolve-provider-context.ts Removes region-debug logging and the now-unused logger import.
apps/gateway/src/chat/chat.ts Removes region-debug logs around candidate filtering / hybrid key resolution / request resolution.
apps/api/src/stripe.ts Stops logging full webhook payload; logs only Stripe event id/type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@steebchen
steebchen added this pull request to the merge queue Mar 28, 2026
Merged via the queue into main with commit c81aa1b Mar 28, 2026
17 checks passed
@steebchen
steebchen deleted the remove-prod-verbose-logs branch March 28, 2026 16:36
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.

2 participants