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

Disable instrumentation for AspNetCore.SignalR


.NET Agent Question Template


  • Describe what you are seeing:
    We have moved from using using “ASP.NET SignalR” to “ASP.NET Core SignalR”. Previously we were able to ignore all transactions using an extension found in other threads: <?xml version="1.0" encoding="utf-8"?>

This approach does not seem to work for: Microsoft.AspNetCore.SignalR;
In ASPNetCore Signalr, “PersistentConnection” no longer even exists

I tried using “NewRelic.Api.Agent.NewRelic.IgnoreTransaction();” in OnConnectedAsync. It does seem to ignore many of the transactions, but not all.
There still are some that are messing up our stats:

I think I need an xml extension approach since it seems to just live in middleware code:

This may be helpful…
2019-06-04 20:48:32,477 NewRelic DEBUG: TransactionTraceData: [1559681227729,{},{},[0.0,45714.262,“ROOT”,{},[[0.0,45714.262,“Transaction”,{},[[0.056600000000000004,45714.240900000004,“Middleware Pipeline”,{“exclusive_duration_millis”:45713.1448},[[1.5315,2.1519,“Datastore/operation/Redis/EXISTS”,{“host”:“”,“port_path_or_id”:“6379”,“database_name”:“unknown”,“exclusive_duration_millis”:0.62040000000000006},[],“StackExchange.Redis.ConnectionMultiplexer”,“ExecuteSyncImpl”],[2.2036000000000002,2.6227,“Datastore/operation/Redis/HEXISTS”,{“host”:“redis-dev-1.h…”,“port_path_or_id”:“6379”,“database_name”:“unknown”,“exclusive_duration_millis”:0.41910000000000003},[],“StackExchange.Redis.ConnectionMultiplexer”,“ExecuteSyncImpl”]],“NewRelic.Providers.Wrapper.AspNetCore.WrapPipelineMiddleware”,“Invoke”]],“NewRelic.Providers.Wrapper.AspNetCore.WrapPipelineMiddleware”,“Invoke”]],“NewRelic.Providers.Wrapper.AspNetCore.WrapPipelineMiddleware”,“Invoke”],{“agentAttributes”:{“request.uri”:"/updatesHub",“response.status”:“200”,“host.displayName”:“EC2RRRZ-RQ211AC”},“userAttributes”:{},“intrinsics”:{“totalTime”:45.7141843,“trip_id”:“7DC8C7198EC2E5B7”}}]

Thanks for your help!


Hi @devops51,

To effectively use XML instrumentation, the first part is to determine the names of the assembly, class, and method. The best way to do that is Building Custom Instrumentation Tracer Factories From .NET Agent Log Files, following the directions up to Putting it all together. With those names found, they can be used to Ignore a transaction using XML instrumentation.

Please let me know of any trouble with that, and when you’ve found the exact names, please share here for future reference for the community.