sentry-tauri
sentry-tauri copied to clipboard
Migrate to V2
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
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 👏
Thanks for this PR. I'll review and publish it next week!
when is it available please?
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 😅
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
I'd stopped using the package because of the freezing, but I think @Necmttn has fixed it. Will try his implementation out 🙌
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 😄
Works for me "ipc://localhost/"
if (typeof breadcrumb.data?.url === "string" && breadcrumb.data.url.startsWith("ipc://localhost/")) return null
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()
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
Just seen that v2 has made stable so I'm going to try and find time to get this finished/released.
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
There's now a release supporting v2! https://crates.io/crates/tauri-plugin-sentry