ApplicationInsights.WinForms
1.0.1
dotnet add package ApplicationInsights.WinForms --version 1.0.1
NuGet\Install-Package ApplicationInsights.WinForms -Version 1.0.1
<PackageReference Include="ApplicationInsights.WinForms" Version="1.0.1" />
paket add ApplicationInsights.WinForms --version 1.0.1
#r "nuget: ApplicationInsights.WinForms, 1.0.1"
// Install ApplicationInsights.WinForms as a Cake Addin #addin nuget:?package=ApplicationInsights.WinForms&version=1.0.1 // Install ApplicationInsights.WinForms as a Cake Tool #tool nuget:?package=ApplicationInsights.WinForms&version=1.0.1
Application Insight Helper
This is a helper for Windows Forms Applications. It uses Application Insights to report simple Events like application start and application end and it can also be used to report other application tasks.
It was inspired by Gerald Barre Post: https://www.meziantou.net/2017/03/29/use-application-insights-in-a-desktop-application
This project just provides a nuget to simplify its use.
Installing
nuget Install-Package ApplicationInsightsHelper
Usage
Quick Start
After installing the nuget, modify your application entry point and insert a call like:
Telemetry.StartTelemetry("29A36CDD-80BF-4F76-AE6D-749CBF9C9F1E");
Obviosly you need to change the StartTelemetry
parameter for the telemetry key that you get from your
Azure Application Insights settings.
By calling the StartTelemetry, your application start and end event will be automatically tracked. Also any unhandled exceptions will be registed and send to Application Insights.
Tracking Page Visits
You could modify your Form_Load handlers to add a call to Telemetry.TrackPageVisit("Form1")
. This will let
you monitor when a user is using one of your forms.
Tracking Exceptions
This helper will track all unhandled exceptions. However if you want to track some of the exception that you already
catch you can just call Telemetry.TrackException(yourException);
Tracking Events
You can track simple events just by name. For example:
Telemetry.TrackEvent('ApplicationStart');
Or you can also record additional parameters:
Telemetry.TrackEvent("", new Dictionary<string, string> { { "dbName", "ProductionDB1" } });
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.5
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 9,545 | 1/28/2018 |