-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[JavaScript] Nuxt SDK #9095
Comments
See #6929 |
If you need insights from the Nuxt team at any time, please don't hesitate to reach out! 🙏 |
This is such a great news! It would be ideal that it would work on all envs. It would be great if |
@cosbgn Thanks for the input! Which libraries do you mean with "not all libraries are compatible"? |
Hi @s1gr1d, I don't have an extensive list, but for example AJV doesn't work. Workers don't use node, they use their own runtime (workerd) which is limited to web standards (similarly to deno). I think if you use only |
This is of course for the backend part of nuxt, i.e. nitro. On the frontend sentry/vue should work perfectly. |
I use Sentry on my APIs (fullstack Nuxt 3 deployment to Cloudflare pages) with the sentry/browser package on the API side to get around edge restrictions. The context Sentry devs, for cosbgn's comment, is that Nuxt 3 was built with the "deploy anywhere" ethos, so all the core packages and (new) community modules are designed to be runtime agnostic. That's where https://unjs.io/ was born from. I initially followed this guide if it helps at all with the PR in general https://www.lichter.io/articles/nuxt3-sentry-recipe (written by a core Nuxt 3 dev) |
While we may not support worker (WinterCG) runtimes from the start we will look into it eventually. We are planning to release the SDK iteratively and in stages. Prioritization of worker runtime support depends of course a bit on the demand. I added an item to the list to track. Technically we have all the building blocks available. |
I don't have any specific data, but from my understanding a big percent of nuxt apps are deployed on the edge (vercel-edge, workers, netlify edge, etc) as you get better performance for lower costs, and Nuxt pretty much "guarantees" that it will work on the edge, so it's an obvious solution. I understand if you decide not to prioritize it, I just wanted to let you know that it would be great to have it from day one. It might be as simple as using sentry/core rather than sentry/node (I don't know, just an example). Anyways, thanks for the first party package, love sentry and I would love to be able to add it to Nuxt easily! |
You can configure a custom |
@ThibaultVlacich in your case you would need to add this to your nuxt config: sentry: {
unstable_sentryBundlerPluginOptions: {
errorHandler: // handle your error
}
} If you face any other problems please open up a new issue directly 🙏 |
@gibkigonzo as outlined in the original issue here, this is a tracking issue. Please open a separate issue with information and reproduction steps. Thank you! |
If |
@maximepvrt I am curious - how would your application (or applications in general) benefit from this change? Both Sentry config files are placed in the root to have them visible in one place and the root is also the place where you would add other configs (like |
The idea behind this suggestion is that configurations related specifically to the client-side application have been moved to the app folder in Nuxt 3, such as |
I hate how so many small libs pollute root directory by their configs. It is good to have this option for use-cases with a lot of config, but most projects will be ok with defaults, so 2-3 options. For such amount of config there is convention for Nuxt modules to have their section in the nuxt.config.ts. |
Yes, this makes sense for Nuxt 4 - I'll add it to the list. The reason why not every part of the Sentry config is added inside the key |
@s1gr1d Would it be possible to add an |
Additionally, is there a way to disable the capturing of specific |
You could alternatively add For filtering specific errors you can refer to https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/filtering/ |
Important
This issue is tracking progress on the Nuxt SDK. If you find bugs or problems with the
@sentry/nuxt
package please open a separate issue. Thank you!New SDK for https://nuxt.com/
There is an existing discussion: Sentry SDK for Nuxt
Nuxt uses nitro as their server, this means we'll need to have nitro support. It might make sense for us to create an OpenTelemetry instrumentation for nitro. It will also be valuable to add similar instrumentation for the other libraries Nuxt relies on:
Alpha
Beta
Stable Release: #14487
Check the Stable Realease tracking issue for TODOs regarding the stable release: #14487
TODO but not necessary for stable
Nice to have/Stretch Goals
The text was updated successfully, but these errors were encountered: