我对sails.js很陌生,目前正试图将哨兵与它整合。 我阅读了下面的教程。
https://docs.sentry.io/clients/node/
但是如果我使用patchGlobal命令,我无法在哨兵上注册错误,但是当我声明它为env / production文件时,它在本地错误上工作,但是如果我在其他位置定义它,它甚至不会注册本地错误。
我也尝试将它作为中间件集成,但我无法正确整合它,因为它们提供的链接是用于表达的。
https://docs.sentry.io/clients/node/integrations/express/
任何帮助将非常感激 !
谢谢
I am quiet new to sails.js and currently trying to integrate sentry with it. I read up the following tutorial on it.
https://docs.sentry.io/clients/node/
But i am not able to register error on sentry if i use patchGlobal command, it works on local errors when i declare it env/production file but if i define it in other places it doesn't even register local errors.
I also tried integrating it as a middleware but i am not able to integrate it correctly since the link they have provided is for express.
https://docs.sentry.io/clients/node/integrations/express/
Any help would be really appreciated !
Thanks
最满意答案
这可能是解决您的问题的方法: https : //www.npmjs.com/package/sails-hook-sentry
In the end , i was able to use Winston to log errors using Sentry in Sails. Following is the link:
https://github.com/guzru/winston-sentry
更多推荐
发布评论