{"id":32521887,"url":"https://github.com/swagfin/analyticsnet","last_synced_at":"2025-10-28T06:45:44.049Z","repository":{"id":223564763,"uuid":"404887936","full_name":"swagfin/AnalyticsNET","owner":"swagfin","description":"Simple Analytic Collection Library","archived":false,"fork":false,"pushed_at":"2024-03-22T18:32:34.000Z","size":114,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-10T10:39:27.459Z","etag":null,"topics":["analytics","data-collection","logger","logging-library","metrics-gathering","reporting-tool"],"latest_commit_sha":null,"homepage":"https://github.com/swagfin/AnalyticsNET","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swagfin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-09-09T22:35:33.000Z","updated_at":"2024-07-07T15:12:59.000Z","dependencies_parsed_at":"2024-02-20T22:44:41.318Z","dependency_job_id":"18b69cdf-55c3-4396-a5e0-c4730c5a785f","html_url":"https://github.com/swagfin/AnalyticsNET","commit_stats":null,"previous_names":["swagfin/analyticsnet"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/swagfin/AnalyticsNET","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagfin%2FAnalyticsNET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagfin%2FAnalyticsNET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagfin%2FAnalyticsNET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagfin%2FAnalyticsNET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swagfin","download_url":"https://codeload.github.com/swagfin/AnalyticsNET/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagfin%2FAnalyticsNET/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281397322,"owners_count":26493908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","data-collection","logger","logging-library","metrics-gathering","reporting-tool"],"created_at":"2025-10-28T06:45:41.463Z","updated_at":"2025-10-28T06:45:44.032Z","avatar_url":"https://github.com/swagfin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## AnalyticsNET (Analytics Library for C#)\n\nAnalyticsNET library is designed to empower your application with robust analytical capabilities, including data logging, error metrics logging, error reporting, and insightful metrics collection.\n\n## Features\n\n- **Easy Integration**: Inject the library into your application effortlessly and start collecting valuable analytics data right away.\n- **Error Reporting**: Quickly identify and address errors with built-in error reporting functionality.\n- **Customizable Options**: Tailor the library to your specific needs with customizable options for app settings, API endpoints, and more.\n- **Device Heartbeats**: Keep track of your devices' health with automated device heartbeats.\n\n## Installation\n\nTo get started AnalyticsNET, add it as a Nuget Library:\n\n*NuGet Package*\n```\nnuget Install-Package AnalyticsNET\n```\n\n### Init Service\n\n```cs\n// Init service\nvar analyticService = new AnalyticsService(new AnalyticsOptions\n{\n    AppSecretKey = \"\u003c\u003csomeHashKeyForYourApp\u003e\u003e\",\n    AppName = \"\u003c\u003cYourAppName\u003e\u003e\",\n    DeviceId = \"\u003c\u003cdevice-id-or-macAddress\u003e\",\n    AnalyticsAPIEndpoint = \"https://your-analytics-api.com/\",\n    SendDeviceHeartBeats = true\n});\n\n// Start service\nawait analyticService.StartAsync();\n\n// Track events\nanalyticService.Track(\"health\", \"app started successfully\")\n// Track events \nanalyticService.Track(\"error\", \"Issue with Server, 404 Response\");\n```\n\n### AspNetCore Integration\n\nLibrary is also able to ran as a *Hosted Service* by creating a class and extending from IHostedService\n\n```cs\npublic class AnalyticsNETHostedService : AnalyticsService, IHostedService\n{\n    public AnalyticsNETHostedService(AnalyticsOptions analyticsDeviceOptions, IAnalyticsLogger analyticsLogger = null)\n    : base(analyticsDeviceOptions, analyticsLogger)\n    {\n\n    }\n}\n```\n\nThen registering the class like this;\n\n```cs\nservices.AddHostedService(svc =\u003e new AnalyticsNETHostedService(new AnalyticsOptions\n{\n    AppSecretKey = \"\u003c\u003csomeHashKeyForYourApp\u003e\u003e\",\n    AppName = \"\u003c\u003cYourAppName\u003e\u003e\",\n    DeviceId = \"\u003c\u003cdevice-id-or-macAddress\u003e\",\n    AnalyticsAPIEndpoint = \"https://your-analytics-api.com/\",\n    SendDeviceHeartBeats = true\n}));\n```\n\n\n### Collecting Analytics Data\n\nThere is an example of an Analytics API that shows how you can receive metrics here \n[AnalyticsNet.API](https://github.com/swagfin/AnalyticsNET/tree/master/AnalyticsNET.API)\n\n## Contributions\nContributions 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](https://github.com/swagfin/AnalyticsNET/tree/master/)\n\n## To Do\n\nI am actively adding more features as time goes by and here is the Project Milestones;\n1. Integration with Prometheus and Grafana Dashboards\n2. Ability to add Encryption and Decryption factoring in performance (Done)\n3. More additional features...\n\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/swagfin/AnalyticsNET/blob/master/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagfin%2Fanalyticsnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswagfin%2Fanalyticsnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagfin%2Fanalyticsnet/lists"}