.NET 5 is finally here, released at .NET Conf 2020. .NET 5 was so highly anticipated that we already have a few Instana users deploying the .NET 5 Preview Releases in production, and we expect a sizable part of the ecosystem to eagerly migrate apps to .NET 5 at the earliest possible moment. Naturally, a new runtime in production poses the perennial questions of “How are you going to monitor .NET 5?” Us being us, our answer is obviously going to be “Monitor .NET 5 with Instana!” So let’s take a few minutes to examine .NET 5, how it relates to previous .NET Core and .NET Framework releases, and why we thought it was important to support monitoring .NET 5 even before it officially GA’ed.
With the release this week, the community couldn’t be more excited about it. .NET 5 is the next iteration of .NET Core, that finally brings back together the ecosystem that got split in 2016 between .NET Framework, the closed source Microsoft implementation, and .NET Core, which was launched as an open source project. The open-source nature of .NET Core drew quite a bit of attention throughout the developer community, as developers were able to access the entire .NET source-code on GitHub allowing everyone to participate in reviewing and contributing to the project.
With .NET 5, Microsoft is trying to recapture that enthusiasm by combining the best of .NET and .NET Core into a single platform. According to Microsoft, “.NET 5 is the next step forward with .NET Core. The project aims to improve .NET in a few key ways”:
- Produce a single .NET runtime and framework that can be used everywhere
- Expand the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin, and Mono.
- Build that product out of a single code-base that developers can work on and expand
What IS .NET 5 anyway?
First and foremost, .NET 5 marks the point in time where .NET Core can safely be considered the only option that will offer new capabilities and features going forward. But it is far from being “just” a milestone of the ecosystem. It brings a lot of improvements and cool new features.
A true convergence of .NET Full Framework and .NET Core
Behind the scenes, both .NET Framework (the latest versions) and .NET Core are implementations of the .NET Standard Specification, which ensures that a lot of existing software written on .NET Framework could be ported to .NET Core with little to no effort, opening up more options for running and distributing the respective applications. .NET Core 3.0 even added capabilities/extensions to use Windows-Forms and WPF again, which successfully addressed some roadblocks preventing enterprise-applications from being ported to .NET Core.
However, some very Windows-specific libraries and APIs have never made it into .NET Core, simply because they did not fit .NET Core’s cross-platform strategy (who needs registry-access on Linux ?), or because some stacks are not worth investing much into anymore (WebForms, WCF, WF to name the most prominent ones). However, due to the open-source nature of .NET Core, chances are that we will see replacements for these things if there are enough people out there who really need it.
Meanwhile, the best of the whole ecosystem, .NET Framework, .NET Core, Mono and Xamarin has been taken and moved into .NET 5.
The outcome is a development-experience which is always the same, no matter what your target platform is. iOS, Android, Linux, macOS, Windows – the APIs and capabilities will always be the same.
A framework for heavy-duty workloads
.NET Core has been implemented from the beginning with performance and throughput being a paramount requirement in order to serve the most demanding workloads out there. And even the most cursory of looks at the tech-empower benchmarks proves that the community did a great job of it.
There has been a significant amount of time invested into optimizing the performance of the platform at the BCL level. Many applications that have been written for .NET Core will automatically benefit from these improvements once they run on .NET 5.
A collaborative effort of the community
If we had to pick one distinct thing that opened up the way the .NET Core platform took in the past years, it was definitely the fact to open the development up, make it an all-open-source effort and give it to the community, allowing existing .NET-heads and other technology-enthusiasts to join and start contributing to the platform.
This new spirit, encouraging and embracing discussions about options, requirements, specifications and everything that goes with it entirely changed the way the platform was developed. A far cry from the mentality of the old Microsoft days, when one company decides for everyone and creates a community of dependent individuals, towards a community sharing goals that have been openly discussed before.
With .NET Core receiving a lot of attention and input over time, the gaps between what .NET Core had to offer and what existing .NET developers knew from the .NET Framework have been reduced with every release, while still adding new capabilities across a load of different packages.
Especially note-worthy is the decision to unify the platforms and not continue to maintain multiple, distinct versions of the Base Class Library (BCL) and runtime-environment allowing developers to reduce the drift (and avoid adding more) across their various .NET applications running.
Cool new features
In terms of new cool features, .NET 5 has quite a lot to to offer:
- Select your runtime, Mono or CoreCLR: While CoreCLR and Mono both are implementations of the CLR, both have their unique approaches to some scenarios, which can make quite a difference depending on the workload. Mono was and is a part of Xamarin and thus more targeted towards mobile devices. CoreCLR, instead, is the continuation of :NET Core’s implementation and targeted primarily towards cloud-application workloads, IOT and Desktop applications.
- Ahead-Of-Time (AOT) compilation: Until now .NET developers have always relied on a Just-In-Time (JIT) compiler. A JIT compiler optimizes your hot code methods by compiling them from the abstract machine representation that is CLR, to optimized, architecture specific binary. .NET Core’s JIT is excellent, and well suited for long-running applications. Among other things, .NET Core’s JIT allows for re-translation (optimize your code differently over time depending on how inputs change) and in-place optimizations, and can thus kind of “react” to an environment it is running on, which also makes it the optimal choice for applications running in containers. So, JIT optimizes your application as it runs, and will remain the default mechanism going forward, but .NET 5 brings AOT compilation to the table, where you heavily optimize upfront, so that your code can have a smaller footprint and faster startup times. The Mono-Project built an AOT-compiler for .NET which will already be used by Blazor and iOS-targeted applications by default, since these require a native compilation.
- Java and Objective-C interoperability: Java- and Objective-C/Swift interoperability is a capability that Xamarin brought to the .NET world. It makes sense to make this a part of the base-platform and allow you to call (on a in-process basis) into Java directly by just adding jars to your project-file.
- Diagnostic tooling: .NET Core 3.0 introduced some interesting utilities such as
dotnet-dump. .NET 5 there will deliver new versions of all of these tools and more capabilities to diagnose dumps while guaranteeing a unified experience on any platform.
Instana has early adopters covered with immediate support
At Instana, we love .NET and especially .NET Core. We are excited to see the ecosystem evolve and we jumped at the opportunity of adding support for .NET 5 as early as feasible, which is effective immediately.
Our NuGet packages, since version 1.1.59 released back in September, have been supporting preview builds of .NET 5. With the backend version 188, we have been exposing the .NET Core runtime signature in Unbounded Analytics and Dynamic Focus, so that you can drill down, slice, dice and group all your .NET Core applications by runtime and bask in the glory of your shiny new .NET 5 apps. (As well as finding out which ones you still need to upgrade.)
When Microsoft releases .NET 5 in late November, we’ll be there, supporting the latest and greatest .NET runtime from day 1 with the best distributed tracing available on the market.
We actually take it as a badge of honor that the effort of extending our support to .NET 5 was extremely limited, and we take that as confirmation that our tracing technology is future-proof.
Immediately discover bottlenecks in your code
Always know that your applications are being fully monitored, whether running directly on hosts or within containers scaling up or down. Instana immediately discovers all your processes, including .NET 5 and traces them to give you real-time, immediately actionable results to troubleshoot issues and improve latency.
^Find immediately bottlenecks in your systems and what causes latency for your users.
Get started monitoring your .NET 5 applications today
Are you ready to gain full visibility into the performance of your .NET 5 applications? Get started monitoring and optimizing your .NET 5 applications with Instana’s best in class Application Performance Monitoring and Enterprise Observability Platform. If you don’t already have an Instana instance, check out automated .NET 5 monitoring with a free trial instance now. Once you see the power of monitoring your .NET applications with Instana, you’ll wonder how you ever got by without it.