Eric Allam

Results 149 comments of Eric Allam

@ryanleecode this looks great! Can you add a changeset file to this PR as well? In the root of the repo just run `pnpm run changeset:add` and then do a...

Which version of react are you using? If you are on React 18.x, unfortunately I don't think there's anything that can be done as that `cache` import is only available...

@Lms24 we're seeing the same thing on https://github.com/triggerdotdev/trigger.dev using `@sentry/remix` 9.4.0. I wrote a memory profiling harness to try and track down the leak that: - Does a fresh build...

@Lms24 https://drive.google.com/file/d/1n9XzButYbLxWdztuAgEH8NK6iC9kSNY-/view?usp=drive_link

Yea I'm not actually sure yet if it was `includeLocalVariables`. I think actually what I was seeing fix the issue was going from `@sentry/remix` 9.40.0 to `9.46.0`, but am confirming...

Yea okay you can ignore all of the above, I think my memory test harness needs some improvement before I can say definitely what is going on

![Image](https://github.com/user-attachments/assets/237c6b50-5ec6-49f5-b938-bcccea0fdd33)

@Lms24 okay I managed to track down the actual issue. It's the call to `request.clone()` here: https://github.com/getsentry/sentry-javascript/blob/f25664bd6b2da4c99d44a6e639b38550a0e0d436/packages/remix/src/vendor/instrumentation.ts#L289 Removing the call to `clone()` there stops the memory leak from happening. It...

@Lms24 yea you do consume the body with the call to the `request.formData()`, which we are removing with our patch.

@Lms24 did some more experimentation with this and discovered that the leak only occurs when the request is cloned AND the cloned request's body is not consumed. My guess is...