Newrelic + node.js + socket.io [英] Newrelic + node.js + socket.io

查看:82
本文介绍了Newrelic + node.js + socket.io的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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>

There is also an API call that you can use to programmatically do this. You can find more about this in the node.js agent github README.md

这篇关于Newrelic + node.js + socket.io的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆