cordova - Application Insights initialization by code in Windows Phone fails -


we trying application insights in our apps work. if choose automatic configuration "add application insights telemetry" works, if try add following code, not:

        telemetryconfiguration.active.instrumentationkey = instrumentationkey;         telemetryclient tc = new telemetryclient();          tc.trackevent("testevent windows phone"); 

there no exceptions or error messages thrown, not show events in visual studio window or azure portal.

what wrong code? adding of instrumentation key? found here. need add instrumentation key , initialization complete dynamically, because need use in 1 of our cordova applications plugin (which working android).

thanks help.

please follow documentation: https://azure.microsoft.com/en-us/documentation/articles/app-insights-windows-get-started/

in short: 1. add applicationinsight.config instrumentation key. 2. add line windowsappinitializer.initializeasync(); first line in app constructor. 3. create telemetry client , call track methods.

--izik


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

wso2esb - How to concatenate JSON array values in WSO2 ESB? -