Create customizable parameter for Application Insights

Asked

Viewed 84 times

4

In a Webforms project (C# - .NET 4.6.2) I am using telemetry Application Insights from Azure, I would like to send a custom parameter for statistics.

Basically, I want to send Clientid to telemetry, so I could identify some bottlenecks.

inserir a descrição da imagem aqui

Today it presents this data above, I would like to send a custom, if there is no way, I will have to send via Querystring the ClientId but I don’t want to opt for this path because it will be a huge job, besides considering half gambiarra.

I’m using the tracking code via Javascript on Masterpage, something like:

var appInsights=window.appInsights||function(config){
    function i(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",y=u.createElement(o),r,f;y.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(y);try{t.cookie=u.cookie}catch(p){}for(t.queue=[],t.version="1.0",r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)i("track"+r.pop());return i("set"+s),i("clear"+s),i(h+a),i(c+a),i(h+v),i(c+v),i("flush"),config.disableExceptionTracking||(r="onerror",i("_"+r),f=e[r],e[r]=function(config,i,u,e,o){var s=f&&f(config,i,u,e,o);return s!==!0&&t["_"+r](config,i,u,e,o),s}),t
    }({
        instrumentationKey:"minha key"
    });

1 answer

2


  • great, a light at the end of the tunnel, it seems q has also user.id in users, I will test... thanks! giving right already milestone as answer.

  • Show! I hope you solve :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.