新 Relic JavaScript

新 Relic JavaScript

我遇到了一个问题,我登录了 New Relic,但什么都没安装。之后,我的 Chrome 突然在 AMPPS 上向我的本地主机添加了一个奇怪的 JavaScript 代码片段。

如何摆脱它,因为它干扰了我的工作流程?

以下是片段:

<meta http-equiv="X-UA-Compatible" content="IE=EDGE, requiresActiveX=true, Chrome=8" /><script type="text/javascript">window.NREUM||(NREUM={});NREUM.info = {"beacon":"beacon-3.newrelic.com","errorBeacon:":"jserror.newrelic.com","licenseKey":"a0d846db61","applicationID":"1585411","transactionName":"YwZTZUVRWBJRUkVfXlpMdV5DflMVc15fQkNbD11URR9wFF5VUGFeWgZfa1hVXU5jWV5BY1EQRF1DfF8SRA==","queueTime":"0","applicationTime":"447","ttGuid":"CBB2808590BE08C5","agent":"js-agent.newrelic.com/nr-292.min.js"}</script><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function a(b,c,d){function e(f){if(!c[f]){var g=c[f]={exports:{}};b[f][0].call(g.exports,function(a){var c=b[f][1][a];return e(c?c:a)},g,g.exports,a,b,c,d)}return c[f].exports}for(var f=0;f<d.length;f++)e(d[f]);return e}({"4O2Y62":[function(a,b){function c(a,b){var c=d[a];return c?c.apply(this,b):(e[a]||(e[a]=[]),void e[a].push(b))}var d={},e={};b.exports=c,c.queues=e,c.handlers=d},{}],handle:[function(a,b){b.exports=a("4O2Y62")},{}],"SvQ0B+":[function(a,b){function c(a){if(a===window)return 0;if(e.call(a,"__nr"))return a.__nr;try{return Object.defineProperty(a,"__nr",{value:d,writable:!1,configurable:!1,enumerable:!1}),d}catch(b){return a.__nr=d,d}finally{d+=1}}var d=1,e=Object.prototype.hasOwnProperty;b.exports=c},{}],id:[function(a,b){b.exports=a("SvQ0B+")},{}],YLUGVp:[function(a,b){function c(){var a=m.info=NREUM.info,b=m.proto="https"===l.split(":")[0]||a.sslForHttp?"https://":"http://";if(a&&a.agent&&a.licenseKey&&a.applicationID){f("mark",["onload",e()]);var c=h.createElement("script");c.src=b+a.agent,h.body.appendChild(c)}}function d(){"complete"===h.readyState&&f("mark",["domContent",e()])}function e(){return(new Date).getTime()}var f=a("handle"),g=window,h=g.document,i="readystatechange",j="addEventListener",k="attachEvent",l=(""+location).split("?")[0],m=b.exports={offset:e(),origin:l};h[j]?(h[j](i,d,!1),g[j]("load",c,!1)):(h[k]("on"+i,d),g[k]("onload",c)),f("mark",["firstbyte",e()])},{handle:"4O2Y62"}],loader:[function(a,b){b.exports=a("YLUGVp")},{}]},{},["YLUGVp"]);</script>

答案1

这是 RUM JavaScript 代码片段。
请参阅https://docs.newrelic.com/docs/features/how-does-real-user-monitoring-work它还向您展示了如何禁用它。
如果您没有启用 RUM,您可能应该联系 New Relic。
我不确定它目前是否默认启用,我认为是的。

相关内容