ApplicationInsights-JS icon indicating copy to clipboard operation
ApplicationInsights-JS copied to clipboard

[Question] App crash with the trace message

Open madebymt opened this issue 1 year ago • 1 comments

Description/Screenshot Our app crash and check appInsight log show this two traces message below, and I was trying to google around to see what might cause it, but can't find much information about it. Can someone give me a little more suggestion to debug what might cause the app crash? Thank you!

Message:


Device type | Browser |  
Message | AI (Internal): 45 message:"Invalid page load duration value. Browser perf data won't be sent." props:"{total:8134,network:1698,request:289,response:-761,dom:6828}"


Device type | Browser |  
Message | AI (Internal): 72 message:"Mozilla/5.0 (Linux; x86_64 GNU/Linux) AppleWebKit/601.1 (KHTML, like Gecko) Version/8.0 Safari/601.1 WPE" |  
Severity level | Verbose

Steps to Reproduce

  • OS/Browser: Chrome
  • SDK Version [e.g. 22]: 3.0.0
  • How you initialized the SDK: npm

Expected behavior

Additional context Add any other context about the problem here.

madebymt avatar Jan 09 '24 21:01 madebymt

Hi @madebymt, Good questions I'm a little surprised that these have not been discussed before but as "AI Internal" messages they are generally used to signal that the SDK was having issues with something.

First the easy one

  • AI (Internal): 72 - This message is written once per user and only when the ai_user cookie is written (which has a TTL of 1 Year), so you only get this once per year per user. Since v3.x we added a configuration to the Properties plugin to allow you to disable this message disableUserInitMessage (it's currently defaulting to false) and from v3.1 (which we intend to release after this month) we have set this to be true (https://github.com/microsoft/ApplicationInsights-JS/pull/2231). So from v3.1 onwards this message won't be sent anymore (unless you enable this configuration). It's general usage was to provide the ability to review which browsers the users are using, and by linking with the ai_user cookie it was self sampling to once per ueser per year.

  • AI (Internal): 45, this is also an informative message which is sent every time the following function returns false _shouldCollectDuration, there is currently no configuration to "mute" this message by default. But you can use a Telemetry Initializer to drop the event if you don't want to receive this message.

    • So generally, this should mean that it was a "bot / crawler" hitting your site or the reported duration is considered to be "invalid".

My understanding is that these messages do not AI (Internal) accrue to any costs for you subscription.

MSNev avatar Jan 09 '24 22:01 MSNev