我已经用sails.js 0.12集成了一个新的relic,但是在新relic的仪表板中,事务数据不能正常到达,它向我显示了一条像/*这样的路由,它需要最高的响应时间。我不明白为什么这个路由是/*。请帮帮我。enter image description here
发布于 2020-07-07 17:27:47
当然,我会告诉你我所做的一切,帮助你在代码中实现这一点,
首先,我们必须安装NPM包"npm I
“。
‘使用严格的’
/**
- New Relic agent configuration.
-
- See lib/config/default.js in the agent distribution for a more complete
- description of configuration variables and their potential values. _/ exports.config = { /_\*
- Array of application names. _/ app\_name: ['_\*\*\*\*\*\*\*\*\*\*\*\*\***'], // ENTER YOU APP NAME, IT WILL SHOW IN NEW RELIC eg. ["MY\_APP"] /**
- Your New Relic license key. _/ license\_key: '_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*', **// ENTER YOU LICENCE KEY HERE, eg. ['XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX']**日志记录:{ level:'info‘},
规则:{ ignore:'^/ SOCKET.IO‘//这将忽略SOCKET.IO,因为新的RELIC不会理解这一点,并将其事务更改为"/*",我在我的问题中提出了这个问题,最后我自己得到了这个:)
},
allow_all_headers: true,
属性:{ exclude:'request.headers.cookie','request.headers.authorization','request.headers.proxyAuthorization','request.headers.setCookie*','request.headers.x*','response.headers.cookie','response.headers.authorization','response.headers.proxyAuthorization','response.headers.setCookie*','response.headers.x*‘}}
require('newrelic');
我认为这将帮助你在你的代码中设置新的遗迹。如果你遇到任何问题。评论一下就行了。
https://stackoverflow.com/questions/62713939
复制相似问题