nuxt-community / sentry-module

Sentry module for Nuxt 2
https://sentry.nuxtjs.org
MIT License
500 stars 113 forks source link

Nuxt 3 Support #619

Closed harlan-zw closed 1 month ago

harlan-zw commented 1 year ago

Hey :wave: It looks like this module hasn't been updated for Nuxt 3. In an effort to improve the developer experience of modules, I've updated the module to clarify that it only supports Nuxt 2.

I can see Nuxt 3 support is in development (https://github.com/nuxt-community/sentry-module/issues/530), if you need any help please let me know.

When Nuxt 3 support is added we can move the repo to the https://github.com/nuxt-modules organisation.

Thanks!

cc: @rchl

danielroe commented 1 year ago

cc: @manniL

rchl commented 1 year ago

I suppose it would make sense to also update documentation and readme and state more clearly that only Nuxt 2 is supported.

As for Nuxt 3 support, I don't think anyone is actively working on that right now so anyone is free to help with that.

danielroe commented 1 year ago

(I believe @manniL is implementing this for Nuxt 3.)

rchl commented 1 year ago

Had no idea. Would be good to know what's the plan there. Is the intention to create a PR here or work on it entirely separately?

manniL commented 1 year ago

Hey πŸ‘‹ Yes, I (and some other people) will work on a module. As the new module should cover Nitro and Nuxt, I'd suggest to keep the Nuxt 2 and Nuxt 3 version of the sentry module separate (so no direct PR) - but I'm happy to discuss this πŸ˜‹

rchl commented 1 year ago

I feel like that could result in a confusing situation. What would the Nuxt 3 package be called then? And how clear would it be that one is for Nuxt 2 and one is for Nuxt 3?

If all is kept in the same repo then we'd also need to figure how to handle documentation but I suppose there could be two separate URLs and one would link to the other.

manniL commented 1 year ago

I agree. I've thought about these options:

Separate Repositories, Separate Package names

Separate Repositories, same package name

Same Repositories, same package name


I'd recommend against trying to fit Nuxt 2 and 3 compat in one version and keep them separate, also given Nuxt 2 going EOL in a mere 3,5 months, as well as more complex project setup (e.g. testing) + code.

rchl commented 1 year ago

Separate package names could be IMO very confusing so I would vote against that personally.

As for the same or separate repo, I'm not sure. Re-using same repo seems natural but not sure if there are good arguments against that. We could bump major version by 2 or 3 to give Nuxt 2 version some room.

I'd recommend against trying to fit Nuxt 2 and 3 compat in one version

Yeah, that's not gonna work. Wasn't gonna suggest that.

also given Nuxt 2 going EOL in a mere 3,5 months

I doubt :)

(BTW. Separate Repositories, same package name is listed twice in your comment)

manniL commented 1 year ago

Re-using same repo seems natural but not sure if there are good arguments against that.

I guess here it'd be more about the org overhead (issues/PRs/suggestions per versions/doc deployment per version).

Do you plan on maintaining the Nuxt 2 Version of the Sentry module further? Do you want to be involved in development of the Nuxt 3 version (or: did something change compared to the old Nuxt 3 support issue)?

I doubt :)

How do you mean that?

rchl commented 1 year ago

I think it would be beneficial for me to oversee the development of the Nuxt 3 version. Even if I'm currently not using Nuxt 3 myself and might not want to focus on that version myself. My latest plans regarding that are in https://github.com/nuxt-community/sentry-module/issues/530.

And yes, I would be maintaining the Nuxt 2 version for the time being since converting to Nuxt 3 is not in the near term plans.

How do you mean that?

Just my personal feeling. Given how rough the transition to Nuxt 3 was and still is, I feel it would be rather premature to end support for Nuxt 2 soon. But I don't know anything more than the next guy :)

creazy231 commented 1 year ago

glad to see you in here @manniL if I can help debugging / testing let me know πŸ₯³

mukundshah commented 1 year ago

@manniL can you share your work so far? is your latest work in nuxt3 branch?

yanghoxom commented 1 year ago

@harlan-zw Hello

nuxt3 branch ready to use?

i tried adding it to my project in package.json i used

"@nuxtjs/sentry": "nuxt-community/sentry-module#nuxt3",

in nuxt.config.js, I have config like this

     modules: [
         ['@nuxtjs/sentry', {
           ...
         }],
   ]

but I get an error

  Cannot start nuxt: Cannot find module '[project directory]/@nuxtjs/sentry
manniL commented 1 year ago

No, there is no Nuxt 3 support yet.

manniL commented 1 year ago

@rchl Let's go with the same repo then. Might be easier and other modules (e.g. i18n) do the same πŸ‘ In case the org effort will be too high, we can change that later on too.

manniL commented 1 year ago

@rchl Would you mind assigning me to the Nuxt 3 issues?

manniL commented 1 year ago

Also, I wrote an article about why building the module takes longer than running your own implementation + included a very simple recipe if you need Sentry right now and can't wait.

devonik commented 1 year ago

Also, I wrote an article about why building the module takes longer than running your own implementation + included a very simple recipe if you need Sentry right now and can't wait.

Awesome. I will give it a try. Thank you

rchl commented 1 year ago

Also, I wrote an article about why building the module takes longer than running your own implementation + included a very simple recipe if you need Sentry right now and can't wait.

manniL commented 1 year ago
* Minor improvement to the client code - import specific exports instead of `*` to allow tree shaking to work. (ref [fix: significantly reduce client bundle size #547](https://github.com/nuxt-community/sentry-module/pull/547))

Good point πŸ‘

* The `requestHandler` and `errorHandler` middlewares for express ([docs.sentry.io/platforms/node/guides/express](https://docs.sentry.io/platforms/node/guides/express/)) have quite a bit of logic in them (sessions, transactions, ...). Might not be necessary for the simple temporary setup but this is something that would have to be figured out for Nuxt 3 version.

Absolutely, I think that'd be super helpful for the nitro integration ☺️

ssyberg commented 1 year ago

Following!

simonmaass commented 10 months ago

is there any eta for nuxt 3 support?

simonmaass commented 7 months ago

@manniL Thank you so much for the article and the work you have put into this! You wrote in Sep 2023 "Yes, I (and some other people) will work on a module. " Do you have any update for us on the progress?

AnthonyRuelle commented 5 months ago

Hello, Up @manniL, Do you have any update for us on the progress? :D

luckylooke commented 4 months ago

Guys did you manage to do some workaround? Until this v3 support will be implemeneted.. πŸ€”

manniL commented 4 months ago

I'm afraid I will not be able to release the module in foreseeable time. I've tried various ways but eventually couldn't find a good architecture to keep things as configurable "as they should be". Unfortunately, I don't have the time at the moment to give it another try.

What to do instead

Please make sure to raise your opinion in this discussion and ensure to make clear the Nuxt community would love to see a first-class support from Sentry πŸ”₯

(I've also linking to a recipe which you can find in this post.)

robsonsobral commented 4 months ago

Can you, please, add, then, to https://sentry.nuxtjs.org/ that the module is exclusive to Nuxt 2?

Thank you!

manniL commented 4 months ago

@robsonsobral PR welcome for that I'd say πŸ‘πŸ»

Also good to link https://github.com/getsentry/sentry-javascript/discussions/6929 so people can voice their need of Sentry for Nuxt 3 there ☺️

rchl commented 1 month ago

I've updated readme and documentation with links to the Nuxt 3 module.