web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Copilot studio - Appli...
Copilot Studio
Suggested Answer

Copilot studio - Application insights, BotMessageSend not being logged

(0) ShareShare
ReportReport
Posted on by 3
We have two agents within copilot studio, both wired into the same instance of application insights.
 
For one of the agents, every message we send is logged as
BotMessageReceived (with user message)
Topic steps
BotMessageSend (with response to user)
 
But in the other agent, we very sporadically see the BotMessgeSend event, so we can't usefully derive metrics on how long certain tasks took.
 
Both are v similar, have a few knowledge sources and very few topics.
 
Any ideas what we could be missing to reliably see BotMessgeSend in all agents?
Categories:
I have the same question (0)
  • Suggested answer
    Sajeda_Sultana Profile Picture
    91 on at

    We’ve run into something very similar on our side
    We’ve got two Copilot Studio agents wired up to the same Application Insights resource. One logs a clean stream of BotMessageSend for every reply, the other only shows them occasionally. Config and AI instance are basically identical, which made this pretty confusing at first.
     
    From what I can see in the docs and behaviour, BotMessageSend is a platform event and there isn’t any per‑agent setting that guarantees “one event per response”. You can toggle Log activities in the Application Insights settings on the agent, but that’s about it. So if one agent is being a bit random with these events, there isn’t a supported way to “fix” it.
     
    The way we got around this was to stop relying on BotMessageSend and log our own events instead.
     
    In the topics where we care about timings, we now do this:
    • At the start of the topic, we store utcNow() in a variable like TaskStartTime.
    • We run the normal topic logic (questions, actions, flows, knowledge sources).
    • Just before or after the final “Send a message” node, we drop in a Log custom telemetry event step.
    • We call that event something like BotReply and send a few properties into App Insights: topic name, a logical task name, start time, calculated duration, outcome, etc.
     
    That gives us one custom event per reply that we actually control, and those show up reliably in customEvents. In Kusto we just query on name == "BotReply" instead of BotMessageSend and use the duration we logged for our metrics.
     
     
     
    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Sajeda_Sultana
  • NH-23041252-0 Profile Picture
    3 on at
    Thanks @Sajeda_Sultana
    I did consider the same idea - is there a reliable way to catch the agent response to all messages? We don't really care at specific topic level, but more interested as global catch all
     
    I.e. for every message a user asks, how long does the agent take to process it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 550

#2
Vish WR Profile Picture

Vish WR 191

#3
Haque Profile Picture

Haque 184

Last 30 days Overall leaderboard