-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Unexpected amount of spans after upgrading to @sentry/nuxt to 9.8 #16039
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
Comments
Hello, were any changes made to It seems like the HTML is cached (by setting |
Hey! We haven't made any changes to the routeRules. Where can i find the Sentry tracing tags? Are you referring to the "sentry-trace" & "baggage" in the initial html that you think is cached? |
Yes, the meta tags. Are the IDs staying the same over page-reloads? They should change. |
It's okay to have those two requests. One is a Can you try downgrading the SDK again (you said it was fine at 9.5) and see whether the sample_rate is included here. I just want to make sure if this is the right track. Either it's something different that was changed during those versions or it's not even related to the version 🤔 And can you please share the debug logs from the server (if possible) and from the browser? |
I added our master branch (with @sentry/nuxt: 9.12.0) to another environment with an identical setup (env variables, etc.). Interestingly, the sample_rate is respected there. I'm currently investigating what differences might exist between the two environments. Based on this, it seems unlikely that the issue is related to the version of @sentry/nuxt. If you have any ideas on what I could check, it would be very much appreciated! |
Hm...so as it's probably not only related to the And in general: Can you maybe share the debug logs (frontend & backend) of an event that is correct in Sentry and one event that is not? The logs would give me more insights into what the SDK is doing under the hood. Thank you 🙏 |
We're currently not using any caching on the server where we're experiencing the issue. After some investigation, we’ve identified that the only difference between the two environments is that sourceMapsUploadOptions is enabled in the one where things aren't working as expected. Here’s the relevant section from our nuxt.config.js:
When we disable source maps, everything seems to work correctly with the configured sample rate. |
Ah thank you, this is very helpful! We released some changes regarding source maps, but those actually seemed unrelated to this. I would have to check why this messes with the sampling but this is the suspected PR: #15859 This was released with |
So far I was not able to reproduce it. How does your setup look like?
|
What we've noticed is that when sourceMapsUploadOptions is enabled and Sentry is also enabled on the server, a baggage meta tag is generatet, but it’s missing the sample_rate. This seems to affect the client-side Sentry, where the missing sample_rate causes all spans to be tracked. We ended up removing our sentry.server.config.ts since we're mostly focused on tracking client-side errors anyway. |
Maybe it's easier if we just have a short chat about this. Please send me an e-mail, so we can schedule something. It's my first and last name (connected with a dot)
Hybrid Rendering is enabled when defining
While I was looking through the traces I saw that there are a lot of connected traces which include requests to a .NET backend. So somehow the traces between this backend and the frontend must be linked 🤔 |
I'll send you an email with some suggestions.
I'm sorry, I thought it was called hybrid rendering. Had to look it up on, and we are using Universal Rendering
We do have requests going from nuxt (server / client side) to a .NET backend. Maybe i misinterpreted your question earlier, but I thought you meant if we had sentry configured in our .NET backend. |
Thanks for clarifications. Let's discuss this further in the call. |
Logging the tracing meta tags makes debugging [things like this](#16039) easier.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
9.8 (now 9.12)
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
see additional details in the JIRA ticket
Steps to Reproduce
After upgrading @sentry/nuxt from 9.5 to 9.8 on March 26, 2025 at 1:54 PM, the customer noticed a large spike in spans reported to Sentry, despite having no changes to their
tracesSampleRate
(which is set to 0.001). Reviewing the changelog didn’t reveal any obvious reasons for this increase.They deployed the update on 3/26/2025 at 1:54 PM. Since then, they upgraded to the latest version 4/9/2025, 2:38 PM UTC and they haven’t seen any changes in the stats in Sentry (they did disable Sentry from our production application though, so that’s the reason for the drop of events in the end of the graph.)
Expected Result
The incoming span count should have stayed roughly the same after the upgrade
Actual Result
The incoming span count increased
The text was updated successfully, but these errors were encountered: