Skip to content

[Due for payment 2026-11-25] Avoid copying Onyx response data into network debug logs #107033

Open

Description

@melvin-bot

Problem

logRequestDetails in src/libs/Middleware/Logging.ts sanitizes API responses by recursively copying nested objects and arrays. This happens on staging and production, not just development.

Large onyxData and paginationOnyxData payloads cause unnecessary synchronous main-thread work. According to the proposal, this sanitized response is only used by console.debug, not server log packets or Sentry.

Proposed change

Exclude onyxData and paginationOnyxData before sanitizing responses for logging. Preserve existing sanitization for all remaining response fields.

Decide whether full response logging should remain available in development only.

Reported benchmarks

  • ~100 reports × 20 actions: 3 ms → 0 ms
  • 3,000 reports × 20 actions: 135 ms → 0 ms
  • 6,000 reports, 50 workspaces, 20,000 expenses: 319 ms → 0 ms

These measurements cover the omitted copying work, not total API latency.

References

Issue OwnerCurrent Issue Owner: @Eskalifer1

Activity

  1. added
    ReviewingHas a PR in review
    and removed
    ReviewingHas a PR in review
    on Nov 16, 2026
  2. changed the title [-]Avoid copying Onyx response data into network debug logs[/-] [+][Due for payment 2026-11-25] Avoid copying Onyx response data into network debug logs[/+] on Nov 18, 2026
  3. melvin-bot commented on Nov 18, 2026

    @melvin-bot
    Author

    @Eskalifer1

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.41-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-11-25. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

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

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions