2
votes

I'm trying to add additional telemetry to a Bot Framework Bot hosted in Azure.

I've been through Microsoft documentation to add telemetry to your bot but when I look at my customEvents within Application Insights, none of the events generated by the Bot framework service are appearing, eg. BotMessageReceived.

I've been through all of the debugging steps I can think of, including:

  • Checked my code compared to the docs, the code in the startup.cs matches and I've added it into the dialogs too
  • Checking the InstrumentationKey value
  • Creating a new Application Insights API key

Events are being added into customEvents, see below, just not the events generated by the bot framework service.

Custom events query result

Any help would be greatly appreciated! Thanks in advance.

1
What type of Bot do you have? Can you track http traffic locally with Fiddler for instance? Can you look what is being sent to dc.services.visualstudio.com/v2/track ?Andreas Wendl
It's a C# bot running on the DirectLine channel. I'll look into seeing if I can track the trafficMikeP
Debugging the code and comparing it against the Bot Builder samples, the TelemetryLoggerMiddleware isn't being called. I'll continue to investigate.MikeP
@MikeP Were you able to find out more?Bhargavi Annadevara
I've resolved the issue locally so the Telemetry middleware is being called. It was an issue with my code. My code was originally written for V3 of the Bot framework so it wasn't using a BotFrameworkHttpAdapter and wasn't set up to use the TelemetryMiddleware which was Introduced in version 4.MikeP

1 Answers

1
votes
  • Might wanna check and disabling application insight(app service) in the bot , so there won't be duplication , that might affect the event feeding enter image description here

  • The bot service might be using a private link and that's why it cannot feed the Application Insights and send telemetry , try removing or approving the private link connectivity of the application insight (check it from the Private Link Center / private endpoint connections).

enter image description here

further info on private link troubleshooting : https://docs.microsoft.com/en-us/azure/private-link/troubleshoot-private-link-connectivity