0

We have a couple of upload controls on our webforms application. Those pages show a long response time. These pages have other functonality as well so we dont want to ignore the whole page in new relic which is discused in this thread NewRelic - How to Ignore part of a web application

Is there a way to ignore metrics in a part of a page through the new relic api?

Community
  • 1
  • 1
Addeladde
  • 777
  • 2
  • 9
  • 28

1 Answers1

0

You can use IgnoreTransaction for a specific method. The method, however, is non-discriminatory. There is no way to tell it "only ignore the transaction for specific pages". However, there's no reason you cannot call the method using an if statement, and then specify the individual pages within that if statement so they are ignored. The pages in question would have to be isolated in your code, but that shouldn't be too difficult. I hope this helps!

Kyle
  • 91
  • 3
  • So if set NewRelic.Api.Agent.NewRelic.IgnoreTransaction() in a method on a page this will only ignore just that method? If i want the whole page to be ignored where do I put it then? – Addeladde Nov 02 '14 at 08:35
  • 1
    This depends on whether or not you want the entire page ignored in "Browsers", or if you want every method within the page itself ignored, but want browser monitoring to still provide page load timing. If you want every method loaded within the page ignored, you would have to use the IgnoreTransaction() method for every method loaded by the specific page. If you want the page ignored for browser monitoring, you would need to add the DisableBrowserMonitoring() method to the top of the page in your application code. – Kyle Nov 03 '14 at 16:43