Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

How to ignore a specific Transaction in New Relic

insights

#1

I have a .NET Core rest web service, that I setup. Everything is instrumenting just fine, except that I have one transaction that shows being hit 200 times a minute. This is throwing off all the other data that I am wanting to see in New Relic. That transactions has a name of

/ROOT in the new relic web site, but is really WebTransaction/ASP/ROOT.

I cannot seem to find a way to ignore this transaction from reporting to new relic. I don’t think it is really anything that I have in the code, so I cannot use the Ignore_Transaction functionality.

Is there a way in the config file to tell it to completely ignore this transaction? My service is not really being used by much yet, but this transaction shows about 200 hits a minute, while every other transaction from my service combined shows about 20 hits a minute. This site also is being run behind an F5 load balancer, deployed across 8 different machines. In the future, this service will get heavy use, but right now, it is still under development.

Thanks


#2

HI @JLINDNER - It may be possible to do this using Custom Instrumentation to ignore the transaction.


#3

I tried that. The problem is, custom instrumentation requires the className to ignore. And no where can I find a classname for this. Is there a way in New Relic to see the class names for a given item? I have checked the logs, and looked all over the web site looking for what the class name would be.


#4

Ah, you need to determine which Microsoft classes, I am assuming that this would be a transaction recorded from a Microsoft class.

If I knew anything about .Net Core, I would try to provide more assistance.


#5

Thanks for the response.

Yep. That is unfortunetly the issue. I cannot find anything in new relic that actually can tell me what class or anything else about this transaction. I had this server monitored by microsofts AppSight solution before, and that didn’t show these transactions.

I am pretty sure if I could get the class name from new relic somewhere, I could probably ignore these transactions. But I cannot find anything in new relic that can tell me that information, and I have no end point in my service that contains anything similar to this name.

I am pretty new to using new relic for .net core, so hopefully someone else has seen this issue before, and knows that to do.


#6

@JLINDNER -

We probably need to find out more about those transactions and where they might be coming from. Could you look at the results of an Insights query like this:

select * from transaction where appId = <appId> and name like 'WebTransaction/ASP/ROOT%' since 30 minutes ago limit 1000

Eh, I hope I got the syntax all correct there! You can pull the appId from the rpm uri or you can use the appName attribute in its place.

There should be a request.uri attribute that may give a hint as to the source of those requests. The response.status attribute could be interesting as well. Maybe other Insights attributes could be revealing.

You could also put a perma-link to the app here so Support can take a look.

The fact that the transactions are categorized as ‘ASP’ is odd - that means the requests haven’t traversed a code path the agent understands. I would guess some middleware prior to the MVC/WebAPI middleware is returning a response. We’ve seen the Cors middleware do this for preflight requests. Could the load balancer be the source of those requests? 200 hits a minute is odd though.

One other odd thing is the string ‘ROOT’ in the transaction name. That may mean the request uri lacked even a path. Something like www.example.com rather than www.example.com/a/b/c

As far as ignoring those you’ll probably need to write your own custom middleware which identifies those requests and calls the IgnoreTransaction API method.

I hope that helps - let us know what you find.


#7

I tried the query, but can’t seem to get it to return any data to put in there. Here is a permalink to it to see if support can identify what is going on.

https://rpm.newrelic.com/accounts/1878168/applications/209026183


#8

I also thought the same thing about the load balancer causing the issue. So I had them remove one of the servers from the load balancer so its health checks would not run against it, and the server still had the same number of calls to /ROOT that it had before, so it wasn’t the load balancer doing it. The load balancer just checks to see if the port is alive, doesn’t actually call the service to make sure it is running.

I also already have my own middleware today. One for automatically handling exceptions that occur in the code(5xx errors), and handling them automatically.


#9

I did a little more playing around with this here also. I added logging into my custom middleware, that all requests go through, to see if I could see any requests being made to the service that would have something like /ROOT in it. I ran it for 10 minutes, and had no requests that contains /ROOT. All the requests contained valid URIs for endpoints in the service. I still received the 200 requests a minute according to new relic, but only had 10 requests written into the log. The 10 requests for my real endpoints that I called. No other requests were written into the log. With that being the case, since whatever this /ROOT is, I am not sure a custom middleware can be written to ignore it. The middleware never sees them.


#10

Ok. I am incorrect that the middleware is not catching it. It actually is catching these requests. I am not really sure why these requests are appearing like they are, and what they are coming from. I ended up finding out that the request.Path.Value was either a blank string, or a “/”, and nothing behind it. not a URL to my site or anything like that. As soon as I put in a check for that, and told it to ignore that transaction, it appears to have addressed this issue.

Thanks for your help on this. I think I have it working like what I need now.


#11

@JLINDNER -

Oh that’s good news! I was about to send the following reply when I saw yours. FWIW:

I was able to get that Insights query to work and it showed the request uri was just ‘/’. Can you see this query? The string ‘ROOT’ is something our UI appends to a transaction name if the agent didn’t supply a name. In this case the agent didn’t supply a name because 1) the request didn’t traverse an instrumented path other than the middleware pipeline and 2) there was no path in the request uri (otherwise, the transaction would have been named after the path).

I’m not sure that the above is helpful. Something is sending those empty path requests. The agent is just reporting what it sees pass through the pipeline.


#12

That is good to know. Yeah. I can now see it in the query you sent. I have no idea what is calling it with that. I might play around and try to figure out what. I can look into the logging to see at least what IP Address it is coming from.

Thanks for your help on this. It is now doing exactly what I want.