Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Newer ServiceStack reporting badly with New Relic

Some of our latest Web Service applications has been using the newer 3.9.x version of ServiceStack and we are about to update one of our older applications from v3.5.x to use 3.9.44.0. The 3.5.x version has been reporting quite well with New Relic, but the ones we have with 3.9.x is so far reporting weird with New Relic. Sometimes it reports with low traffic but other times it just is flat lined.

We have an open ticket with New Relic and been told they hook into System.Web.HttpApplication.BeginRequest() and no known timeline for any changes to their ServiceStack support in the DotNet service for any possible issue here.

So we are curious if there is something changed in ServiceStack that would bypass this hook for any reason?

Or have anyone else who uses New Relic, experienced this and found a solution without New Relic's involvement?

like image 307
Quintium Avatar asked May 22 '13 21:05

Quintium


2 Answers

We were finally able to find a solution to the problem. The newer ServiceStack were releasing all found transaction instances which also included the instance that was created by New Relic's service agent. To avoid the New Relic instance to be released prematurely, the AppHostBase.Release method can be overwritten in your own AppHost:

public override void Release(object instance)
{
   if (instance.GetType().ToString().StartsWith("NewRelic.Agent", StringComparison.CurrentCultureIgnoreCase))
     return;

   base.Release(instance);
}
like image 149
Quintium Avatar answered Nov 15 '22 12:11

Quintium


This has to do with New Relic's lack of instrumentation for the later versions of the framework. If something changed, New Relic will need to add support for it.

like image 1
Scalayer Avatar answered Nov 15 '22 11:11

Scalayer