Yesterday we published to GitHub the results of several months of work by the Loupe team - the open source Loupe Agent for .NET Core. This is our first agent with support for .NET Core (1.1 and 2.0) and is the first version of the Agent we’ve made available as open source. We’ll be publishing official distributions to NuGet soon of the libraries in this repo but you don’t need to wait, just clone and build the agent from Agent.sln.
Beyond the Loupe team we’d like to thank our early contributors, particularly Mark Rendle, for helping with this port.
How Loupe Supports .NET Core
Developers don’t simply need the Loupe Agent to support its traditional API to be effective in .NET Core, it also needs to support the common frameworks and patterns that are new in Core. For example, the approach to application configuration is entirely different in Core compared to .NET Framework. Additionally, There is a new common logging API (Microsoft.Extensions.Logging) which effectively replaces the old Trace logging (and then some!).
In our first push we’re focusing on the primary requirements for .NET Core Support:
- Existing Loupe API: If you have an investment in your own custom metrics or logging code with us you can just recompile and run, no code changes required.
- Microsoft.Extensions.Logging: We have support for this so Loupe can capture log data for any part of .NET Core that is exposing it to this interface (which is a lot!)
- ASP.NET Core Agent: Like we’ve done for ASP.NET Web API and MVC we’re building an agent for ASP.NET Core.
- EF Core Agent: Like we’ve done for Entity Framework 6 we’re building an agent for EF Core.
The first two are already done and in the GitHub repo. We’ll be publishing then to NuGet soon once we’re confident in the correct packaging strategy. The ASP.NET Core Agent is just started and will show up in GitHub soon. We haven’t started the EF Core Agent yet.
How is this Different than the regular Loupe Agent?
Our original plan for .NET Core was to first create the next generation Loupe Agent and then port it once .NET Standard 2 shipped. For a long time, no one was asking for .NET Core support so it seemed like we had the opportunity to take this luxurious approach. That all changed when VS 2017 shipped: Suddenly we got a ton of requests.
Since the Loupe 5 agent has a significant number of new features and changes to the API we knew we couldn’t wait for it to be fully baked before supporting Core so we started a parallel port we called “Loupe Agent Machete”. We literally chopped out everything from the agent that isn’t supported by .NET Core while keeping the API the same. For example, all of the WinForms code integrated into the Agent? Gone. Performance counters and .NET Framework monitoring? Not supported by Core 1.1, that’s gone too. Send packages via email? Nope, no built-in SMTP client in .NET Core.
There are some capabilities we really don’t want to cut but haven’t been able to make work in .NET Core 1.1 so you’ll likely see different agents for Core 1.1 and 2.0 soon, namely so we can offer source code attribution.
In short, this means that you shouldn’t use this agent if you’re not using .NET Core because you’ll get less out of it. Instead, keep your powder dry and wait for the new open source of Loupe Agent v5 coming out later this year.
While the API is virtually identical (save a few UI commands that don’t make sense in Core) any code that you’ve built to target the Loupe Agent will need to be recompiled as the assembly names are different for Core.
Why Open Source
We’ve been planning for two years to open source the Loupe Agent but those efforts have been tied with the next generation Agent which is still in development. When we decided to take a more direct path to creating an agent for .NET Core we saw an opportunity to move right away. Since .NET Core is heavily open source and rapidly evolving we wanted to be open from the start. This will be particularly useful as .NET Core is still baking a bit around the edges so if there’s a disturbance in the force you will be able to make your own fixes on the fly without waiting for us to ship a new long-term support agent.
We made the decision two years ago to change the Loupe Agent from closed source to open for two main reasons:
- Our fundamental goal is to improve software quality: We want to reduce runtime problems for users everywhere. The best way to get there is to make it as easy as possible for users to incorporate Loupe even if they will never use one of our commercial offerings. With what we’ve open sourced you could build your own log viewer, analyzer, pretty much everything we do if you wanted to.
- What we do with the data is our main value: We want to keep the pressure on ourselves to deliver compelling products based on what we do with the telemetry, even when you know you have a choice whether to use us or not. With the Agent open source you can create your own viewer, forward data to any other system you want, whatever. We’ll earn our place in your toolbox based on how effective we are at interpreting the data.
We knew it was going to take a bit of work to move our code because we had to go back and verify the copyright of all of our source code, eliminate several modules where we used libraries or code contributions incompatible with the MIT license, and revise the documentation and copyrights on all of the files.
We are working to get a robust group of contributors to Loupe for the full Loupe Agent v5 when it goes open source later this year. Meanwhile, we are keen to have community help with the Loupe Agent for .NET Core but we’d recommend focusing efforts on features for Core and not code cleanup or other internal details. The reason is that we’re going to have to hand port all of these changes back to the Loupe Agent v5 when it breaks cover so we’re trying to minimize the internal changes until then. If in doubt, just ask!
The Loupe Agent for .NET Core is interoperable with the rest of the Loupe 4.0 family including Loupe Desktop (our rich Windows client) and Loupe Server (self hosted and cloud hosted). This includes the data files themselves as well as the real-time data stream.
What About Support
Even though we’re going open source with the Loupe Agent, we’ll provide the same support we have for all of our closed and open source components of Loupe. You can contact us at Support.OnLoupe.com and we’ll help you out, whether you’re a paying customer or not. If you’ve spotted a problem with the Loupe Agent for .NET Core by all means open an issue in GitHub or contact support and we’ll do it as needed.
Loupe 4.7 is now available for download with GDPR enhancements, new server data usage displays and more enhancements requested by our users. Read more
Read about the behind-the-scenes process for the new Loupe explainer video from Katharine Agg, the founder of Gradino UK. Kat explains the components that come together to create a great video and the process she uses to help clients go from vague ideas to a compact, attention grabbing video Read more
Add logging and telemetry to your ASP.NET Core web site is easy with the Loupe Agent for ASP.NET Core. Designed for .NET Core, this agent supports User Secrets for secure configuration and records any information provided by the new diagnostic system built into ASP.NET Core. Read more