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
Post a Comment