A lightweight, high-performance library for tracking and publishing telemetry to Azure Monitor.
Developed by Stas Sultanov, this library is designed for efficiency, prioritizing speed and minimal memory usage.
If this library benefits a business, consider supporting the author.
To install the library, use the following command:
dotnet add package Stas.Azure.Monitor.Telemetry
For further instructions on how to use the library please read this document.
Any qualified engineer will naturally ask: why use this library if Microsoft provides the official SDK(s)?
Well, there are several compelling reasons why the author chose to invest life time and effort into creating this library:
- Microsoft.ApplicationInsights has flaws in implementation.
For instance, take a look on the way how it handles Entra based authentication.
The implementation has an issue, which is described by the author here. - Microsoft.ApplicationInsights does not reference NET462 directly, which support end on 12 Jan 2027.
The Microsoft library references NET452 and NET46 which support ended on 26 Apr 2022. - Microsoft.ApplicationInsights considered for deprecation.
As for Dec 2024 Microsoft recommends switching to Azure Monitor OpenTelemetry Distro. - The OpenTelemetry is not designed to be used for plugins development.
The library heavily rely on use of static data which does not implement thread safe singleton pattern. - Both Microsoft.ApplicationInsights and OpenTelemetry are extremely heavy in some applications like NET462.
This increases memory consumption and time to start.
Take a look at the comparison.
A comparison of library sizes and file counts when used with Entra-based authentication:
Package(s) | NET462 | NET8 | NET9 |
---|---|---|---|
Stas.Azure.Monitor.Telemetry 1.0.0 |
Files: 1 Size: 42KB |
Files: 1 Size: 42KB |
Files: 1 Size: 42KB |
Microsoft.ApplicationInsights 2.23.0 Azure.Core 1.13.2 |
Files: 112 Size: 4639KB |
Files: 5 Size: 945KB |
Files: 5 Size: 945KB |
OpenTelemetry 1.11.1 Azure.Monitor.OpenTelemetry.Exporter 1.13.0 |
Files: 126 Size: 5243KB |
Files: 32 Size: 2386KB |
Files: 26 Size: 2233KB |
Donations help the author know that the time and effort spent on this library is valued.
The author resides in a country affected by heavy military conflict since February 2022, making it extremely difficult to find stable employment. Donation provides significant support during these challenging times.
If you’d like to make a donation, please use the button below.
Thank you for your support!