.NET Agent async mode now available!


I’m very pleased to announce the availability of “async mode” in the .NET Agent! Async mode, which now provides asynchronous instrumentation for HttpClient and HttpWebRequest, is available as of version and is activated via a feature flag.

Why a feature flag?
Not all of the agent’s core features are yet available while the agent is in async mode, so please read the list of features that will be disabled before you activate the feature flag.

Why would I want to activate it?
Async mode provides a look at the agent’s asynchronous framework instrumentation as it becomes available. At the moment, this is HttpClient and HttpWebRequest.

Is this supported, or is this just a beta?
This is a fully supported feature, on par with all of our other agent functionality. As such, our normal support policy and procedures apply.

Ok, let’s see it. How do I activate it?
Details are here, in our documentation:

I tried it out and I have some feedback, do you want to hear it?

You bet we do! We’ve made this available now because we want you to try it out and let us know what you think. Your input shapes our product!


The feature request thread for this has been closed, but it specifically asked for both HTTP and DB. After updating the agent and enabling async, I’ve got a tiny bit more information about the transactions, but still nothing for my database metrics. Were async database calls not part of this feature?

Hey there @sean_terry_seas - as we roll out our asynchronous support with the .NET Agent, some features needed to come out in phases. This first phase that’s available in 5.11.53 has some caveats that you’ll want to take note of:


Be aware that when async mode is enabled, certain features will be disabled but with future release, will come more functionality with async support. For now, check out what is disabled with regard to database instrumentation:

While async mode is active, instrumentation for the following datastores are disabled:

Microsoft Enterprise Library

As time goes on and newer releases become available, so too will more features for async!

Hope this sheds some light on the current status of async support with our .NET Agent but if you have any other specific questions you were curious to have answered, let us know.


“Agent API: While async mode is active, the agent API is disabled.”,
https://docs.newrelic.com/docs/agents/net-agent/features/async-mode-net#disabled-features .
Did I understand correctly that agent API fully will not work in async mode? Or, is it just about async calls/threads?

Hi @Nikita_Danilov,

You understand correctly. Currently the Agent API will not function at all when async mode is enabled. Keep an eye on that document and the Release Notes - as more releases become available, these features will be implemented!


1 Like

Any ETA when the support of database (specially SQL server) would be available?

Hi @kazi.rashid,

No ETA as of yet that we can share, but the developers are definitely working hard to add more features into the Async mode agent. As David mentioned above, keeping an eye on our Release Notes will be the best place for updates when it becomes available.


As of today’s release, we support the Agent API in Async Mode! Please see our release notes for details: https://docs.newrelic.com/docs/release-notes/agent-release-notes/net-release-notes/net-agent-514430


As of today’s release, we support synchronous databases including SQL Server in Async Mode! Please see our release notes for details: https://docs.newrelic.com/docs/release-notes/agent-release-notes/net-release-notes/net-agent-514430


Hi @sean_terry_seas, which async database were you interested in in particular?

Hi @mwalker,

Is async method instrumentation supported for non-iis/custom-instrumentation apps (specifically Owin self-host)? Thanks.

Hi @DAntonov,

Custom instrumentation for asynchronous methods will only connect that work to the original transaction when the work stays on the same thread or when an HttpContext is available (in other words, in an IIS application). We’re working on a new custom instrumentation API for multiple agents that allows work across threads to be logically connected. I’ll update this thread when that feature becomes available.

Great question, thanks for posting!

any more news on this? thanks

@shadow Non-IIS instrumentation has not been added to the async mode feature yet. Our developers are still working on making async mode as feature rich as legacy mode. As features are added they are described in the release notes. This is the best place to check on whether a feature you are looking for has been added. Of course, we will still respond to the forum posts, but taking a look at the release notes might provide more immediate gratification. :slight_smile:

@shadow @kyle All agent release notes are cross referenced here in the forum as well! Check the #releases tag to find them! :blush:

I appreciate the release notes but was just wondering on progress of that work. Async is now almost defacto and not having support for this is becoming a significant issue and devalues the feature set we’re paying for. We’ve already started investing in alternative tracing offerings in the newer parts of our system where we can’t get NR coverage. As much as I love NR, and I really do, the longer this drags on (and it’s been dragging on for quite some time) the less I rely on you.

Right, I understand @shadow . Of course, you posted because you would like an actual update! I definitely hear you—this has been in the works for quite a while.

I don’t have any new news on this; a non-IIS instrumentation feature is still in progress. You know our Engineering teams: nothing is released until it meets their very high standards!

I will be passing your inquiry and your use case along to my product managers so they can see how this is affecting your relationship with our product. The input you shared above is truly invaluable and I thank you for being candid and honest. We love that you love New Relic, and first and foremost we want you to feel like you can rely on our product.

If there is anything else you would like to add feel free. @mwalker and I will try to post here as soon as there is news on this—keep your eyes peeled! Thanks again.

1 Like

@mwalker . I ran into some issues where NR wasn’t seeing my async service calls using HttpWebRequest in my IIS app. I filed a support case, and they informed me that the documentation is incorrect and that only the async methods on HttpClient are instrumented. Any idea if HttpWebRequest is on the short-term roadmap? Not having it is quite limiting. Thanks!

@mpeterson Thanks for letting me know how this limits you—I will be sure to pass up your input to the product management team.

I’m not sure about the roadmap—I am going to reach out and see if I can get some more info on the status of this feature. In the meantime I will file a feature request, hang tight! I’ll update this thread as soon as I can. And thanks again!