botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

LuisResult telemetry is duplicated in Application Insights

Open Dan-Bai opened this issue 4 years ago • 9 comments

Describe the bug

A bot using LUIS intent with telemetry enabled is occasionally logging LuisResult twice.

Version

2.0.0

OS

  • [x] macOS
  • [x] Windows
  • [ ] Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Create Node bot with Core Bot with QnA Maker template
  2. Add trigger with Intent Recognized for something simple (I used Help with utterance help)
  3. Start bot and open in webchat
  4. Type the utterance

Expected behavior

A single LuisResult per utterance

Screenshots

Additional context

Dan-Bai avatar Jul 15 '21 16:07 Dan-Bai

Hi @Dan-Bai, can you elaborate how did you find that an input utterance's LuisResult got logged twice in AppInsight telemetry? A screenshot would be much helpful.

hcyang avatar Jul 17 '21 19:07 hcyang

@hcyang It was brought to my attention when our reporting had incorrect data. I then created a simple bot with an intent trigger, I was then able to see two LuisResult events in application insight for each utterance.

Dan-Bai avatar Jul 19 '21 13:07 Dan-Bai

Hi @dmvtech, please try to repro. Thanks.

hcyang avatar Jul 19 '21 15:07 hcyang

hi @Dan-Bai

I believe I can reproduce the same. We will look into this and update asap. Thank you.

dmvtech avatar Jul 19 '21 22:07 dmvtech

Reproduces with .NET runtime as well.

dmvtech avatar Jul 19 '21 23:07 dmvtech

The other odd thing I see is that sometimes there are duplicates, but not always. As @Dan-Bai says; occasionally.

image

dmvtech avatar Jul 20 '21 17:07 dmvtech

If this bot is a composer bot or using Adaptive Dialogs, this is likely being caused by the fact we end up calling the recognizer twice per turn. We should probably double check to make sure we only log telemetry once per turn...

Stevenic avatar Jul 22 '21 18:07 Stevenic

Thanks @Stevenic , attaching that issue you're referencing here for others. I will first investigate to see if even after caching we are logging twice. If not, then the suggestion is for others to switch to 4.14

taicchoumsft avatar Jul 22 '21 18:07 taicchoumsft

Verified that we are still logging telemetry twice per turn in 4.14.1, we will fix this for next release.

taicchoumsft avatar Jul 26 '21 18:07 taicchoumsft