sentry-tauri icon indicating copy to clipboard operation
sentry-tauri copied to clipboard

Migrate to V2

Open arashi-dev opened this issue 1 year ago • 12 comments

Solves #10

I've tried my best to migrate it to v2. I tested it and it works in both development and production but it may still have some bugs.

ADVICE: In the 2nd version of tauri, it is recommended to use the tauri-plugin-<package-name> name convention. So, I changed the name of the package and I demand to change the package name in the cargo registry as well, so we can then add it to the project simply by yarn tauri add sentry

arashi-dev avatar Apr 21 '24 01:04 arashi-dev

Great PR! I'm also using it for an app @helmerapp. We've forked this branch for the time being, but would love for it to get merged and released as the "proper" plugin way 👏

clearlysid avatar Apr 28 '24 07:04 clearlysid

Thanks for this PR. I'll review and publish it next week!

timfish avatar Apr 28 '24 11:04 timfish

when is it available please?

enri90 avatar May 30 '24 09:05 enri90

when is it available please?

The Tauri beta version has been released. this changes may need to be updated. I'm not sure. And I don't have time to test it :(( It would be nice if someone test this package again and see if it still works

I also request @timfish to check it again and give us an update 😅

arashi-dev avatar May 30 '24 13:05 arashi-dev

I just tested this out at https://github.com/craftgen/craftgen/commit/183e0a94652d87c0ad65eda226f54ce8154afebe it's working. --- Edit: I endup removing the breadcrumb was causing thousands of requests in the app and almost freezes the ui

Necmttn avatar Jun 27 '24 01:06 Necmttn

I'd stopped using the package because of the freezing, but I think @Necmttn has fixed it. Will try his implementation out 🙌

clearlysid avatar Jun 27 '24 03:06 clearlysid

It's strange! I don't have that UI freezing.

If you guys look at this part of the code, you'll see that I've added some filtering to not report errors from Tauri commands which would make a huge request spam: https://github.com/arashi-dev/sentry-tauri/blob/96506e1f5cd74f1a2f648b7b70abbf40a9bd7132/js/index.ts#L35

Please look at your console or network tab, and check what other filtering this function needs.

Additionally, @timfish. I understand that you might be busy or not sure about merging this PR. however, I would respectfully request you to help solve bugs and merge the PR. If you think you don't have the time, tell me. Maybe I publish my own fork to cargo and npm registry 😄

arashi-dev avatar Jun 27 '24 12:06 arashi-dev

Works for me "ipc://localhost/"

if (typeof breadcrumb.data?.url === "string" && breadcrumb.data.url.startsWith("ipc://localhost/")) return null

enri90 avatar Jul 06 '24 13:07 enri90

Works for me "ipc://localhost/"

if (typeof breadcrumb.data?.url === "string" && breadcrumb.data.url.startsWith("ipc://localhost/")) return null

@Necmttn @clearlysid Do you guys confirm? if yes, give me a signal using reactions, or reply and I will commit it.

if you have problem with testing it in local environment, tell me to guide you.

P.S: probably we should use .includes() instead of .startsWith()

arashi-dev avatar Jul 06 '24 14:07 arashi-dev

See if it can be useful to you with this version I can trace errors

https://github.com/enri90/plugins-workspace/tree/pr_sentry_plugin/plugins/sentry

enri90 avatar Jul 06 '24 19:07 enri90

Just seen that v2 has made stable so I'm going to try and find time to get this finished/released.

timfish avatar Oct 02 '24 16:10 timfish

Just seen that v2 has made stable so I'm going to try and find time to get this finished/released.

It may be better to make a new branch and update this plugin again instead of using this branch. It's been months since the last time I used tauri and I am not so sure if the changes in this branch are still valid. Maybe some APIs are changed or something. You can use this branch just as a reference

arashi-dev avatar Oct 02 '24 19:10 arashi-dev

There's now a release supporting v2! https://crates.io/crates/tauri-plugin-sentry

timfish avatar Oct 19 '24 11:10 timfish