用Sail.js设置Sentry(Raven)(Setting up Sentry (Raven) with Sail.js)

编程入门 行业动态 更新时间:2024-10-26 20:30:01
用Sail.js设置Sentry(Raven)(Setting up Sentry (Raven) with Sail.js)

我对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

更多推荐

本文发布于:2023-08-02 20:24:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1380628.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:js   Sail   Sentry   Setting   Raven

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!