When working with ApplicationInsights you sometimes need to see whether data is sent out. For that purposes you can use Fiddler.
But also sometimes you want to filter that data, find some specific events or metrics, from certain users or with certain customer properties.
With Tx.ApplicationInsights.Session nuget you can create a live session and run LINQ queries to filter data.
Here is the example:
- Open your application that is integrated with ApplicationInsights (http://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/).
- Open ApplicationInsights.config and add TelemetryChannel tag under root ApplicationInsights tag.
For 0.13 - 0.14.1 SDK:
1 2 3
For 0.14.1 and later
1 2 3
- Add and run this code in LinqPad:
1 2 3 4 5 6 7 8 9
or add and run this code in regular console application. Make sure that the following namespaces are being added: System.Reactive, Tx.ApplicationInsights.Session and Tx.ApplicationInsights.Session.TelemetryType.
- Start your sample application. When it starts generating request telemetry you will see requests being logged in LinqPad/Console Application.
Your application will send data to http://localhost:1234/ so you can inspect it but data will not be forwarded to your AI production endpoint.
Now you can modify this example to filter data using regular LINQ.
Currently the library supports all 10 ApplicationInsights telemetry types (They all are in Tx.ApplicationInsights.Session.TelemetryType namespace).