0
votes

I have a project where it was capturing custom events, exception, page views.. It is not throwing any error and working perfectly in my local machine and it was showing in the azure dashboard., The azure team has created the new dashboard and now i am seeing pageviews, exceptions but not custom events.,

I enabled the custom events option from the dashboard too... Even though it is not being displayed... If you see the exception it is custom exception and it thrown from the same code.. it works fine but custom event not...

Any idea....

1
I tried to use Application Insights to log custom event, it works fine on my side. Could you provide more information about how your custom event?Jambor - MSFT
I have a custom class where it has few methods to log exeptions and custom events., Class clsLogAppinsight { AppInsightLogException() { Code to log the exceptions., } AppInsightCustomEvents() { Code to log custom Events., } } This was previously working fine and showing all telemetric details in Azure application insight., Recently they created a new dashboard and my application instrumentation key is pointing to the newly application insight in azure., The page view and Exceptoins are working fine. but i am not seeing any custom events.,kamal

1 Answers

0
votes

Given that you've stated you are seeing pageviews and exceptions, and that you have a class i'm presuming 2 things about your project:

  1. asp.net, using the .net ApplicationInsights.Web, etc nuget packages

  2. web pages, using the Javascript application insights snippet+etc.

Given those 2 assumptions, i'm presuming your custom events are in the c# code?

If you're seeing pageviews and browser exceptions, that means the instrumentation key being used by the javascript code is one thing, (probably hardcoded directly in _layout.cshtml or something similar?) and the instrumentation key used by the asp.net code is something else, (probably coming from applicationinsights.config file?)

If you've changed the instrumentation key in one place, make sure you've changed it in both.

One way to verify this is to use something like Fiddler, and go to your site, and watch for calls to dc.services.visualstudio.com (those are calls from the sdks to send data). the javascript code will make some calls, and the asp.net code will make its own calls. inside the outbound data will be instrumentation keys, and you can se which one is using which, and which one you need to fix.