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): Skip span creation for OPTIONS and HEAD requests. #11149

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

onurtemizkan
Copy link
Collaborator

Fixes: #11105

Skips span creation for OPTIONS and HEAD requests in wrapRequestHandler, which apparently are the unwanted requests mentioned in #11105. We can also implement a more precise filtering but this seems to resolve it on my local test application.

Copy link
Contributor

github-actions bot commented Mar 17, 2024

size-limit report 📦

Path Size
@sentry/browser 22.1 KB (0%)
@sentry/browser (incl. Tracing) 31.71 KB (0%)
@sentry/browser (incl. Tracing, Replay) 66.92 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 60.52 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 70.75 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 75.67 KB (0%)
@sentry/browser (incl. Feedback) 30.87 KB (0%)
@sentry/browser (incl. Feedback, Feedback Modal) 30.89 KB (0%)
@sentry/browser (incl. Feedback, Feedback Modal, Feedback Screenshot) 30.89 KB (0%)
@sentry/browser (incl. sendFeedback) 26.88 KB (0%)
@sentry/react 24.78 KB (0%)
@sentry/react (incl. Tracing) 34.61 KB (0%)
@sentry/vue 25.53 KB (0%)
@sentry/vue (incl. Tracing) 33.44 KB (0%)
@sentry/svelte 22.23 KB (0%)
CDN Bundle 24.11 KB (0%)
CDN Bundle (incl. Tracing) 32.66 KB (0%)
CDN Bundle (incl. Tracing, Replay) 66.37 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 71.63 KB (0%)
CDN Bundle - uncompressed 71.67 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 97.71 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 207.1 KB (0%)
@sentry/nextjs (client) 33.8 KB (0%)
@sentry/sveltekit (client) 32.24 KB (0%)
@sentry/node 119.95 KB (0%)

@onurtemizkan onurtemizkan marked this pull request as ready for review March 17, 2024 17:03
@Lms24
Copy link
Member

Lms24 commented Mar 18, 2024

which apparently are the unwanted requests mentioned in #11105

@onurtemizkan just before I merge this, would you mind explaining why these are the requests mentioned in the issue/discord? I'm probably missing some context here and I'm curious how you identified it.

@onurtemizkan
Copy link
Collaborator Author

@Lms24, looking again, I'm now not sure if this completely resolves all the cases mentioned in the linked issue. That's a misunderstanding on my side.

I have seen a polluted transaction list caused by documentRequests which we auto-instrument. Link To Transaction
This resolves them for now.

I'm converting the PR to draft now, I'll try to experiment with the external requests and update the patch accordingly.

Thanks for the review!

@onurtemizkan onurtemizkan marked this pull request as draft March 18, 2024 14:49
@Lms24
Copy link
Member

Lms24 commented Mar 18, 2024

Ok makes sense, thanks for double checking!

@onurtemizkan onurtemizkan force-pushed the onur/remix-skip-options-head-transactions branch from d984176 to de88797 Compare April 5, 2024 13:50
@onurtemizkan onurtemizkan force-pushed the onur/remix-skip-options-head-transactions branch from de88797 to 2f2f831 Compare April 8, 2024 20:09
@onurtemizkan onurtemizkan marked this pull request as ready for review April 8, 2024 21:03
@AbhiPrasad
Copy link
Member

Do we want to backport to v7?

@onurtemizkan
Copy link
Collaborator Author

Do we want to backport to v7?

Yes, I think so, I'll open a PR.

@AbhiPrasad AbhiPrasad merged commit f7db230 into develop Apr 8, 2024
69 checks passed
@AbhiPrasad AbhiPrasad deleted the onur/remix-skip-options-head-transactions branch April 8, 2024 21:19
onurtemizkan added a commit that referenced this pull request Apr 8, 2024
…11149)

Fixes: #11105

Skips span creation for `OPTIONS` and `HEAD` requests in
`wrapRequestHandler`, which apparently are the unwanted requests
mentioned in #11105. We can also implement a more precise filtering but
this seems to resolve it on my local test application.
AbhiPrasad pushed a commit that referenced this pull request Apr 8, 2024
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
…etsentry#11149)

Fixes: getsentry#11105

Skips span creation for `OPTIONS` and `HEAD` requests in
`wrapRequestHandler`, which apparently are the unwanted requests
mentioned in getsentry#11105. We can also implement a more precise filtering but
this seems to resolve it on my local test application.
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.

Only generate spans/transactions for remix related routes in Remix/Vite app
3 participants