New Relic Custom Metrics - Cannot get it to work

若如初见. 提交于 2020-01-06 11:45:24

问题


I've tried to follow the New Relic documentation at https://docs.newrelic.com/docs/dotnet/dotnet-agent-custom-metrics for setting up custom metrics on our web application but cannot get it to work.

In the New Relic trace we see lots of

Application code (in System.Web.Mvc.MvcHandler.BeginProcessRequest()) - Our agent can't see what is happening in your .NET code. Consult our documentation to find out how to add custom metrics to your app.

So, I've created a MyInstrumentation.xml file, put it in the extensions folder and am still not seeing any additional metrics. What am I doing wrong?

Here is example XML of my custom metrics:

<?xml version="1.0" encoding="utf-8"?>
<extension xmlns="urn:newrelic-extension">
<instrumentation>
  <tracerFactory>
    <match assemblyName="WebSite.Area" className="WebSite.Area.Controllers.MyController">
      <exactMethodMatcher methodName="MyMethod" />
    </match>
  </tracerFactory>
  <tracerFactory>
    <match assemblyName="Business.CustomerBL" className="Business.CustomerBL.MyBusinessClass">
      <exactMethodMatcher methodName="SaveCustomer" />
    </match>
  </tracerFactory>
</instrumentation>
</extension>

回答1:


An application pool recycle was what was required



来源:https://stackoverflow.com/questions/20680249/new-relic-custom-metrics-cannot-get-it-to-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!