问题描述
Newrelic于2013年10月24日宣布支持node.js应用程序.
Newrelic announced support for node.js applications on Oct 24, 2013.
我为node.js服务器设置了监视.这是一项通过socket.io与Client通信的服务.现在,所有类似此服务的/socket.io/*/xhr-polling/40pt1SBvasfDuwctz4Ma
请求似乎都需要20.000秒.
I set up monitoring for my node.js server. It is a service that talks to Client via socket.io. Now, all the requests like this /socket.io/*/xhr-polling/40pt1SBvasfDuwctz4Ma
for the service appear to take 20.000 seconds.
是否可以设置newrelic以便正确显示socket.io服务的请求时间?
Is there a way to set up newrelic so it would correctly show request times served by socket.io?
推荐答案
New Relic为您提供了忽略规则的选项,完全像这样.例如,您想要添加如下内容:
New Relic gives you the option to ignore a rule for something exactly like this. For example you would want to add something like the following:
// newrelic.js
exports.config = {
// other configuration
rules : {
ignore : [
'^/socket.io/.*/xhr-polling/.*'
]
}
};
还有一个API调用,可用于以编程方式执行此操作.您可以在node.js代理github README.md 中找到有关此问题的更多信息. a>
这篇关于Newrelic + node.js + socket.io的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!