Newer ServiceStack reporting badly with New Relic
Asked Answered
O

2

8

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?

Overtime answered 22/5, 2013 at 21:19 Comment(0)
O
7

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);
}
Overtime answered 29/7, 2013 at 13:24 Comment(2)
Is this change still necessary, or did New Relic figure out something from their end? - ThanksCarbonation
@Carbonation - I do not believe New Relic did and I think they might not be able to since ServiceStack is grabbing all existing instances related and try to release them. Why this probably is always needed in ServiceStack unless ServiceStack add it in the Base release code.Overtime
G
1

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.

Groupie answered 22/5, 2013 at 22:31 Comment(2)
@Scalayer--can you please be more specific as to what has changed in ServiceStack and how it's hooking into the request processing pipelineow vs. earlier. This information may help understand why New Relic is not working with later versions of SS.Baikal
I'm not a ServiceStack developer, but I'm sure you could contact them for more info.Groupie

© 2022 - 2024 — McMap. All rights reserved.