Set user context ids in telemetry for web app bot build using QnA maker and Bot Framework version sdk3.0 RRS feed

  • Question

  • Hi,

    We have created Web App BoT using QnA maker and Bot framework sdk version 3.0.

    We have enable Application Insight for QnA maker service on Azure, in Web App bot page, i have added below line of java script code.


    <script type="text/javascript">
    var appInsights=window.appInsights||function(a){
      function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply(c,b)})}}var c={config:a},d=document,e=window;setTimeout(function(){var b=d.createElement("script");b.src=a.url||"",d.getElementsByTagName("script")[0].parentNode.appendChild(b)});try{c.cookie=d.cookie}catch(a){}c.queue=[];for(var f=["Event","Exception","Metric","PageView","Trace","Dependency"];f.length;)b("track"+f.pop());if(b("setAuthenticatedUserContext"),b("clearAuthenticatedUserContext"),b("startTrackEvent"),b("stopTrackEvent"),b("startTrackPage"),b("stopTrackPage"),b("flush"),!a.disableExceptionTracking){f="onerror",b("_"+f);var g=e[f];e[f]=function(a,b,d,e,h){var i=g&&g(a,b,d,e,h);return!0!==i&&c["_"+f](a,b,d,e,h),i}}return c



    I am getting Users, sessions etc in logs, but i want details level logs like user ids wise questions asked to BoT etc.

    For same, i have go to Application Insights -> Overview -> Analyzer -> Schemas -> traces and run query, but it gives me blank user id.

    I have also browse link  which indicate i need to set user ids, but i am not able to find for Web App BoT where i should i need to write this code.

    Wednesday, May 8, 2019 12:26 PM

All replies