Skip to content

A lightweight library for tracking application telemetry with Azure Monitor.

License

Notifications You must be signed in to change notification settings

stas-sultanov/azure-monitor-telemetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Monitor Telemetry

CodeQL Check Release NuGet Version NuGet Downloads

A lightweight library for tracking application telemetry with Azure Monitor.

Authored and maintained by Stas Sultanov.

Support the author, if this library benefits your business.

Start Using the Library

For usage instructions, refer to the documentation.

Key Drivers

This library has been developed with a strong focus on business adaptability to serve IT solutions of all kinds.
The library is guided by the following key design principles:

  • Efficiency – Run fast with minimal memory usage due to lightweight codebase and low complexity.
  • Responsibility – Embrace control over how telemetry is tracked and managed, with decisions left to the developer.
  • Simplicity – Minimize the number of classes, relationships, and hierarchies to keep the design as lean as possible.
  • Transparency – Gain full visibility into how telemetry is tracked and published, without unnecessary abstraction layers.
  • Versatility – Use in any type of application, from distributed systems to standalone apps and plugins.

Quality Assurance

Strict quality standards are applied throughout the development of this library and reflected in the following safeguards:

  • The repository is configured with branch protection rules targeting the main branch, including the following:
    • Require signed commits.
    • Require a pull request before merging, with the allowed method: Squash.
    • Require code scanning results via CodeQL.
  • The workflow Check is created to run on pull requests to the main branch and performs the following:
    • Checks that the code builds with no errors.
    • Executes unit tests with a coverage threshold of 95%.
    • Executes integration tests with a coverage threshold of 75%, using a temporary Azure environment that is automatically provisioned and disposed.
  • The workflow Release is created to:
  • The project build is configured to:
    • Treat all warnings as errors.
    • Set the warning level to MAX.
    • Enforce code style in the build via editorconfig.
    • Use dotNet analyzers with analysis level latest-all.
    • Ensure that all public members are documented.

Why This Library?

Why build or use a custom library when Microsoft already provides an official SDK?

There are several technical reasons why this library was developed:

Libraries Size Comparison

A comparison of sizes and file counts of libraries when used with Entra-based authentication:

Package(s) NET462 NET8 NET9
Stas.Azure.Monitor.Telemetry 1.2.0 Files: 1
Size: 64KB
Files: 1
Size: 63KB
Files: 1
Size: 63KB
Microsoft.ApplicationInsights 2.23.0
Azure.Core 1.45.0
Files: 109
Size: 4644KB
Files: 5
Size: 945KB
Files: 5
Size: 945KB
OpenTelemetry 1.11.2
Azure.Monitor.OpenTelemetry.Exporter 1.3.0
Files: 126
Size: 5250KB
Files: 23
Size: 1887KB
Files: 22
Size: 1728KB

Support the Author

Donations express appreciation for the author’s dedication and the substantial effort invested in creating this library.

The author resides in a country affected by ongoing military conflict since February 2022.
Due to the war, securing stable income is extremely difficult, and donations provide essential support.

If you’d like to make a donation, please use the button below:

Any support is much appreciated!