Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(remix): Set formData as action span data. #10836

Merged
merged 12 commits into from
Apr 26, 2024

Conversation

onurtemizkan
Copy link
Collaborator

Resolves: #10238

Clones the request in action to read formData and sets each entry as an attribute to the action span.

Also adds a new e2e test application using latest Remix with Express, which both tests server and client-side.

There seem to be a few limitations regarding the availability of complete data (multiple file uploads from a single input for example), but I think we can consider this as the best effort.

This will only work when sendDefaultPii is set to true, but we can also add another option to control this.

@onurtemizkan onurtemizkan changed the title feat(remix): Set formData as span data. feat(remix): Set formData as action span data. Feb 28, 2024
@onurtemizkan onurtemizkan force-pushed the onur/remix-express-formdata branch 4 times, most recently from cf0b64f to 3e92cda Compare February 28, 2024 15:07
@onurtemizkan onurtemizkan force-pushed the onur/remix-express-formdata branch 2 times, most recently from 873a5a1 to f0490ab Compare March 7, 2024 16:06
Copy link
Contributor

github-actions bot commented Mar 7, 2024

size-limit report 📦

Path Size
@sentry/browser 21.64 KB (0%)
@sentry/browser (incl. Tracing) 32.68 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.03 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.43 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.07 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.28 KB (0%)
@sentry/browser (incl. Feedback) 37.78 KB (0%)
@sentry/browser (incl. sendFeedback) 26.43 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.93 KB (0%)
@sentry/react 24.33 KB (0%)
@sentry/react (incl. Tracing) 35.64 KB (0%)
@sentry/vue 25.47 KB (0%)
@sentry/vue (incl. Tracing) 34.47 KB (0%)
@sentry/svelte 21.77 KB (0%)
CDN Bundle 23.95 KB (0%)
CDN Bundle (incl. Tracing) 33.98 KB (0%)
CDN Bundle (incl. Tracing, Replay) 67.67 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 83.55 KB (0%)
CDN Bundle - uncompressed 70.58 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 100.94 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.55 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 256.94 KB (0%)
@sentry/nextjs (client) 34.86 KB (0%)
@sentry/sveltekit (client) 33.24 KB (0%)
@sentry/node 138.47 KB (0%)

@onurtemizkan onurtemizkan force-pushed the onur/remix-express-formdata branch 3 times, most recently from d225fcb to 5d458fe Compare March 12, 2024 23:23
action_form_data_test: 'test',
action_form_data_file: 'file.txt',
});
});
Copy link
Member

Choose a reason for hiding this comment

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

@onurtemizkan onurtemizkan force-pushed the onur/remix-express-formdata branch 2 times, most recently from 92f3e76 to 954ac65 Compare April 25, 2024 10:17
/* Run your local dev server before starting the tests */
webServer: [
{
command: 'pnpm tsx start-event-proxy.ts',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to switch to tsx from ts-node after hitting TypeStrong/ts-node#1997 and spending hours just to fail to resolve it.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

One more change and then we can merge!

packages/remix/src/utils/instrumentServer.ts Outdated Show resolved Hide resolved
Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
@AbhiPrasad AbhiPrasad merged commit d381ace into develop Apr 26, 2024
95 checks passed
@AbhiPrasad AbhiPrasad deleted the onur/remix-express-formdata branch April 26, 2024 19:02
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.

FormData not logged with RequestData integration
3 participants