新遗物监视的应用程序可以明确地从内部生成事件警报吗?
我正在使用New Relic(Heroku附加组件)来监视Rails应用程序。该应用中有一个地方检测到“这永远不应该发生”的情况,无法通过New Relic的监视轻易检测到,我希望能够使用新的遗物通知/警报/其他任何东西以立即发出耀斑那个代码路径。有没有一种方法可以明确触发应用程序中的警报,这样我就不必为事件警报添加另一个宝石/插件?
(这似乎类似于这个2013年的问题从来没有确切地回答,现在的评论中的链接现在是陈旧的))
I'm using New Relic (Heroku add-on) to monitor a Rails app. There is a place in the app that detects a "this should never happen" condition that's not easily detectable via New Relic's monitoring, and I'd like to be able to use New Relic notifications/alerts/whatever to immediately send up a flare in that code path. Is there a way to explicitly trigger an alert from within an app, so that I don't have to add another gem/plugin just for incident alerts?
(This seems similar to this 2013 question that was never definitively answered and whose links in comments are now stale)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用或 newrelic :: agent.notice_error 方法。
You can use NewRelic::Agent.record_custom_event or NewRelic::Agent.notice_error methods.
我会做这样的事情:
I'd do something like this: