AnalyticsNET 1.0.5
See the version list below for details.
dotnet add package AnalyticsNET --version 1.0.5
NuGet\Install-Package AnalyticsNET -Version 1.0.5
<PackageReference Include="AnalyticsNET" Version="1.0.5" />
paket add AnalyticsNET --version 1.0.5
#r "nuget: AnalyticsNET, 1.0.5"
// Install AnalyticsNET as a Cake Addin #addin nuget:?package=AnalyticsNET&version=1.0.5 // Install AnalyticsNET as a Cake Tool #tool nuget:?package=AnalyticsNET&version=1.0.5
AnalyticsNET (Analytics Library for C#)
AnalyticsNET library is designed to empower your application with robust analytical capabilities, including data logging, error metrics logging, error reporting, and insightful metrics collection.
Features
- Easy Integration: Inject the library into your application effortlessly and start collecting valuable analytics data right away.
- Error Reporting: Quickly identify and address errors with built-in error reporting functionality.
- Customizable Options: Tailor the library to your specific needs with customizable options for app settings, API endpoints, and more.
- Device Heartbeats: Keep track of your devices' health with automated device heartbeats.
Installation
To get started AnalyticsNET, add it as a Nuget Library:
NuGet Package
nuget Install-Package AnalyticsNET
Init Service
// Init service
var analyticService = new AnalyticsService(new AnalyticsOptions
{
AppSecretKey = "<<someHashKeyForYourApp>>",
AppName = "<<YourAppName>>",
DeviceId = "<<device-id-or-macAddress>",
AnalyticsAPIEndpoint = "https://your-analytics-api.com/",
SendDeviceHeartBeats = true
});
// Start service
await analyticService.StartAsync();
// Track events
analyticService.Track("health", "app started successfully")
// Track events
analyticService.Track("error", "Issue with Server, 404 Response");
AspNetCore Integration
Library is also able to ran as a Hosted Service by creating a class and extending from IHostedService
public class AnalyticsNETHostedService : AnalyticsService, IHostedService
{
public AnalyticsNETHostedService(AnalyticsOptions analyticsDeviceOptions, IAnalyticsLogger analyticsLogger = null)
: base(analyticsDeviceOptions, analyticsLogger)
{
}
}
Then registering the class like this;
services.AddHostedService(svc => new AnalyticsNETHostedService(new AnalyticsOptions
{
AppSecretKey = "<<someHashKeyForYourApp>>",
AppName = "<<YourAppName>>",
DeviceId = "<<device-id-or-macAddress>",
AnalyticsAPIEndpoint = "https://your-analytics-api.com/",
SendDeviceHeartBeats = true
}));
Collecting Analytics Data
There is an example of an Analytics API that shows how you can receive metrics here AnalyticsNet.API
Contributions
Contributions are welcome! If you have ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request on Project Repository
To Do
I am actively adding more features as time goes by and here is the Project Milestones;
- Integration with Prometheus and Grafana Dashboards
- Ability to add Encryption and Decryption factoring in performance (Done)
- More additional features...
License
This project is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Initial release of the AnalyticsNET library for C#.
- Added support for data logging, error metrics logging, and error reporting.
- Implemented customizable options for app settings and API endpoints.
- Included device heartbeats feature for monitoring device health.