1
votes

I've had Application Insights set up on my ASP.NET project for a couple months with no issues. I use Custom Events for logging certain events.

Recently, I tried to add a Custom Event after a user has authenticated in order to track the login behavior. My custom event DOES log to application insights debug session. I know this because I can see it in the telemetry when paused on a breakpoint just after the event.

However, when I continue running the application, my custom event no longer shows up the telemetry. It just disappears.

I cannot understand what the issue is. Does anyone familiar have any (application) insights? I couldn't help myself ;)

1
You sure you have set the right date range? By default the portal shows the last 24 hours or something. Where do you look?Peter Bons
@PeterBons Yeah, the default sets to 24 hours, but I even tried narrowing down to last 30 minutes with no luck. I'm using the visual studio application insights window. I'll try stepping through to see exactly where to log is being removed, but it just seems weird that it can be removed.clenard
and how about the azure portal? Do you see the data there?Peter Bons
@PeterBons I never tried the azure portal because I don't have my debug session telemetry hooked up to azure. I only have my production and alpha environments streaming to azure.clenard
Hmm. Sorry... I never work from inside visual studio when it comes to AI. Maybe someone else can be of better service :-)Peter Bons

1 Answers

0
votes

There are some things to check:

  1. are you logging to one resource (iKey) and searching on another? (a lot of people send data to one resource in dev/debug and a different resource in release/prod environments. so make sure you're sending to the place you expect, and searching the place you expect.

  2. is the data actually going out successfully? you may need to use fiddler or some other tool to watch your outbound http for calls to dc.services.visualstudio.com. It could somehow be the case that there's something wrong with the data you're sending, or maybe you're getting capped or throttled by the service. If that's the case, the outbound requests will have responses other than 200, and will generally tell you the reason it didn't accept any items that it rejected.

  3. if the data is getting successfully sent and is going where you expect it to go, there might just be a delay in backend processing. you can always check aka.ms/aistatus to see if there are any current issues with the service.

I am confused, however, by what you mean when you say

However, when I continue running the application, my custom event no longer shows up the telemetry. It just disappears.

What do you mean "it just disappears" ? if you see it in the output window, then the SDK saw it, and it will get sent, precluding any of the above 3 items. Where is it "disappearing" from? unless you clear the output window, it's never gone from there. If you're talking about the VS search tools that show data sent by the AI SDK during debug, that tool currently has a cap of the most recent 250 items that have occurred during the debug session.