Merged
Conversation
fb04bc8 to
6490162
Compare
Contributor
size-limit report 📦
|
6490162 to
5c7772d
Compare
7b5b2a4 to
3023eaa
Compare
dev-packages/e2e-tests/test-applications/nextjs-16/tests/middleware.test.ts
Outdated
Show resolved
Hide resolved
dev-packages/e2e-tests/test-applications/nextjs-16/tests/middleware.test.ts
Show resolved
Hide resolved
chargome
approved these changes
Nov 7, 2025
Member
chargome
left a comment
There was a problem hiding this comment.
Thanks for looking into this! Did you test this out in a local testing app and check how the transactions end up in Sentry?
Member
Author
|
Yep, they end up always in the same transaction. Also that very test locally always passes, I ran it many times and it didn't fail once, so it must be a timing issue or a CI quirk rather than a bug. My idea here is to test that the user get something rather than nothing, I know it's not ideal but I cannot reproduce it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I can't reproduce the flakiness locally, I logged a few things on CI runs and it seems while the fetch spans does get created, it doesn't get created on the middletrasnaction.
This is similar to what the note is saying in dev-mode, for it to be less flakey I'm asserting if it either has the span on the right transaction or if it got created in a separate transaction. Ideally we want it to be created within the middleware transaction but it seems like there is a timing issue preventing it from being picked up there.
At any case this seems to reduce or eliminate the chances of failed runs, previously it would fail consistently but with this it didn't fail in 5 runs so far.