W
Wasp10mo ago
victor

implement sentry in wasp

need to implement sentry for fast debug and error reporting
8 Replies
kapa.ai
kapa.ai10mo ago
Hi @victor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
MEE6
MEE610mo ago
Wohooo @victor, you just became a Waspeteer level 1!
kapa.ai
kapa.ai10mo ago
---------------------- I apologize, but I don't have specific information about implementing Sentry in Wasp for debug and error reporting. The provided knowledge sources don't contain details about Sentry integration. However, I can provide some general information about error handling and debugging in Wasp: 1. For server-side operations (queries and actions), Wasp provides a way to handle errors using HttpError. This allows you to send custom error messages and data to the client Docs: Error Handling in Queries (https://wasp-lang.dev/docs/data-model/operations/queries#error-handling) Docs: Error Handling in Actions (https://wasp-lang.dev/docs/data-model/operations/actions#error-handling). 2. Wasp has a built-in telemetry system that collects anonymized usage data to help improve the framework Docs: Telemetry Overview (https://wasp-lang.dev/docs/telemetry#overview). 3. There's an ongoing effort to improve IDE integration and error reporting in Wasp, which might help with debugging in the future Github Issue: RFC: Wasp IDE Integration (https://github.com/wasp-lang/wasp/issues/604). 4. Wasp offers a wasp studio command that provides a graphical overview of your application, which might be helpful for debugging Docs: CLI Reference (https://wasp-lang.dev/docs/general/cli#project-commands). For implementing a third-party error tracking system like Sentry, you might need to integrate it manually into your Wasp project. If you need specific guidance on this, I recommend reaching out to the Wasp community on their Discord channel or creating a GitHub issue for feature request. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @victor, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho10mo ago
Wasp is just Node.js + React, have you tried looking up how to implement Sentry in Node.js? I guess the server.setupFn hook would be very useful for you: https://wasp-lang.dev/docs/project/server-config#setup-function
Server Config | Wasp
You can configure the behavior of the server via the server field of app declaration:
victor
victorOP10mo ago
thanks
miho
miho10mo ago
I wrote a gist on how to implement Sentry into Wasp: https://gist.github.com/infomiho/f87bef255b5a9c274c747c24966add15
Gist
Integrate Sentry into a Wasp app
Integrate Sentry into a Wasp app. GitHub Gist: instantly share code, notes, and snippets.
sim_sima_
sim_sima_2mo ago
Hi @miho , I tried your gist and it's not working for me on localhost or on browser (I get CORS errors). Did you see any?
miho
miho2mo ago
Please the exact error you get and maybe some code (hide any sensitively information)

Did you find this page helpful?