Hello! Welcome to the final lesson in our module on Microsoft Copilot Studio.
In our last session, we completed the development lifecycle by testing, debugging, and publishing our copilot to a custom website. This is a huge milestone, but in the world of professional development, deployment is never the final step. Once an application is live, the cycle of monitoring, analyzing, and improving begins. This is especially true for AI-driven applications like copilots, where user interactions can be unpredictable.
This lesson directly addresses that post-deployment phase. Your goal is to learn how to monitor and analyze chatbot performance and user conversations to identify areas for improvement. Drawing on your experience with application performance monitoring (APM) in the .NET world, you'll find the concepts here familiar. We will explore two tiers of analytics:
- Built-in Analytics: For high-level, at-a-glance performance indicators.
- Azure Application Insights: For deep, granular, and custom analysis using queries—the professional developer's tool of choice.
Mastering these tools is essential for maintaining and enhancing the copilots you build and is a key competency for the PL-400 exam.
1. High-Level Health Check: The Built-in Analytics Dashboard
Copilot Studio provides a set of out-of-the-box analytics dashboards that offer a quick overview of your copilot's performance. Think of this as the executive summary: it's great for understanding key performance indicators (KPIs) and sharing high-level trends with stakeholders.
Let's start with a brief video that introduces the concept of the analytics dashboard.
Copilot Studio Beginner to Pro | Full AI Chatbot Course 🤖💻
This short clip from Pragmatic Works provides a first look at the built-in analytics section in Copilot Studio and explains its purpose.
Watch the segment from 01:13:53 to 01:15:57. The key takeaway is understanding that Copilot Studio automatically collects usage data and presents it in a dashboard to help you identify areas for improvement.
The built-in dashboards have evolved to become quite powerful, offering detailed insights without any custom setup.

As you can see from the dashboard, you can quickly assess:
- Summary: Core metrics like total sessions, engagement rate, and resolution rate.
- User Satisfaction: CSAT scores if you have implemented post-chat surveys.
- Topic Analytics: Which topics are triggered most, their completion rates, and which have high abandonment or escalation rates. This is crucial for pinpointing problematic or confusing conversation flows.
- Billing: Monitor your billed sessions against your capacity.
While excellent for an overview, these dashboards have limitations for a developer. You can't perform complex ad-hoc queries, correlate data with external systems, or define custom metrics. For that, we need a more powerful tool.
2. Deep-Dive Analysis with Azure Application Insights
For professional-grade monitoring, you can integrate your copilot with Azure Application Insights. This is the same powerful APM service you might use to monitor web apps, APIs, and other services in Azure. It provides a rich, queryable telemetry store for deep analysis.
This integration elevates your monitoring capabilities from simply viewing pre-built reports to actively interrogating the data to answer specific, complex questions.
Capturing Telemetry in Microsoft Copilot Studio with Azure Application Insights
This article from Holger Imbery's blog provides an excellent overview of why and how to use Application Insights with Copilot Studio. It's written for a technical audience and will be our foundation for this section.
Please read the introduction and the sections 'Why Measurement Matters...', 'Capturing Telemetry...', 'Why Use Application Insights?', and 'Connect your Copilot Studio agent to Application Insights'. Focus on the comparison table that contrasts built-in analytics with Application Insights. Also, note the simple process for connecting your copilot by providing the Application Insights Connection String.
As you've read, the process is straightforward:
- Create an Application Insights resource in your Azure subscription.
- Copy its Connection String.
- In Copilot Studio, navigate to Settings > General, paste the string into the Application Insights section, and enable the desired logging options.
Once connected, your copilot will start streaming detailed telemetry events to your Application Insights instance.

3. Querying Telemetry with Kusto Query Language (KQL)
The real power of Application Insights comes from the Kusto Query Language (KQL). If you're familiar with SQL, you'll pick up KQL quickly. The main syntactical difference is its pipe-based structure, where you chain together operators to filter and shape the data, similar to a PowerShell or Linux pipeline.
All copilot telemetry is primarily stored in the customEvents table. The most important details of each event—like the topic name, channel, and user messages—are stored in a JSON-like field called customDimensions.
Let's dive into the practical application of KQL with some essential queries. We'll use two excellent resources that provide a range of examples.
Application Insights telemetry with Microsoft Copilot Studio
This Microsoft Learn document provides several practical KQL queries for analyzing copilot data. We'll focus on a few key examples.
First, read the sections 'Kusto query samples and explanations', 'Analyzing sessions and messages counts...', and 'Query for Distinct User Communication Over Time'. This will give you a feel for basic KQL syntax for time-based analysis and counting distinct values.
Essential Best Practice: Filtering Test Data
Before you run any analysis, it's critical to separate real user data from your own testing activities. Fortunately, Copilot Studio automatically tags test canvas interactions. You should almost always include this filter in your queries.
// Filter out conversations from the test canvas
customEvents
| where tostring(customDimensions.designMode) == "False"
Core Analytical Queries
Now let's explore some queries that help you answer key business questions. We will use queries from both the Microsoft Learn article and the blog post.
These articles contain a wealth of KQL examples. Let's explore how to analyze topic distribution, errors, and performance.
From the blog post 'Capturing Telemetry...', read the sections 'Essential Query Examples', 'Interpreting Query Results', and 'Custom Dimensions'. Pay close attention to the queries for 'Topic and Intent Distribution' and 'Conversation Duration Analysis'. Notice how custom dimensions are accessed using customDimensions['property_name'] or customDimensions.property_name.
Let's synthesize what you've read into a few patterns.
1. Which topics are most popular?
This helps you focus your optimization efforts on high-traffic areas.
// Summarize the count of conversations per topic
customEvents
| where tostring(customDimensions.designMode) == "False"
| where name == "BotMessageSend" // An event that fires when the bot sends a message
| extend topicName = tostring(customDimensions.topicName)
| where isnotempty(topicName)
| summarize count() by topicName
| order by count_ desc
| render barchart
2. What are the most common errors?
This is invaluable for debugging. The following query intelligently parses the error code from the message text.
Application Insights telemetry with Microsoft Copilot Studio
Now, let's look at a more advanced query for error analysis from the Microsoft Learn documentation.
Read the section 'Identify top errors in the bot'. This is a fantastic example of using KQL string functions (indexof, substring) to parse unstructured text and extract structured data for analysis—a common task in log analytics.
3. Which topics are the slowest?
Performance is key to user experience. The next query is a powerful example of data transformation within KQL. It calculates the time difference between consecutive events in a session to measure the duration of each step. Given your C# and data processing background, you'll appreciate the logic here.
Application Insights telemetry with Microsoft Copilot Studio
This final query from the Microsoft Learn guide is a masterclass in KQL. It transforms raw event data into a structured format for detailed performance analysis.
Carefully review the section 'Structuring custom events and custom dimension data'. Don't worry about memorizing the syntax. Instead, focus on what it's achieving: using iif, prev, and row_cumsum to add calculated columns like TimeDifference and RowId, effectively creating a structured log file on the fly that can be used to analyze performance bottlenecks.
Test your understanding!
You are asked to investigate why many users are abandoning conversations in the "Check Order Status" topic. You hypothesize that an API call within this topic is too slow, causing users to give up.
Using KQL, how would you outline a query to verify this? You don't need to write the exact code, but describe the logical steps.
Show answer
- Filter to Production Data: Start by filtering out test traffic (
where tostring(customDimensions.designMode) == "False"). - Isolate the Topic: Filter the events to only those belonging to the "Check Order Status" topic (
where tostring(customDimensions.topicName) == "Check Order Status"). - Calculate Step Durations: Use a technique similar to the advanced query we just reviewed. Use
order by session_Id, timestampand theprev()function to calculate the time difference (TimeDifference) between each consecutive step within a session. - Identify the API Call: Filter the events to the specific action that calls the API. You might identify this by the event
name(e.g., "TopicAction") and another custom dimension that specifies the action's name. - Analyze the Duration: Calculate the average, median, and 90th percentile for the
TimeDifferenceof that specific API call action. - Correlate with Abandonment: Separately, you could identify sessions that were abandoned within this topic. Then, you could check if the
TimeDifferencefor the API call in those abandoned sessions was significantly higher than in completed sessions.
This approach would provide data-driven evidence to confirm or deny the hypothesis that a slow API is causing user abandonment.
Conclusion
Congratulations on completing the module on Microsoft Copilot Studio! In this lesson, you've bridged the gap between deploying a copilot and ensuring its long-term success through continuous monitoring and improvement.
Key Takeaways:
- Two Tiers of Monitoring: Use the built-in analytics for high-level KPIs and stakeholder reporting, and leverage Azure Application Insights for deep, developer-centric analysis.
- KQL is Your Power Tool: Application Insights combined with KQL provides a virtually limitless capability to query, analyze, and visualize your copilot's performance and user interactions.
- Analysis Drives Improvement: The goal of monitoring is to find actionable insights. By identifying popular topics, common errors, and performance bottlenecks, you can prioritize your development efforts to have the greatest impact on user experience.
What's Next?
We are now moving to a new and exciting area of the Power Platform: AI Builder. While Copilot Studio excels at conversational AI, AI Builder provides a suite of pre-built and custom-trainable AI models for different business tasks.
In our next lesson, you will learn how to select the appropriate AI Builder model type for a given business problem, exploring models for form processing, object detection, prediction, and more. This will further expand your toolkit for infusing intelligence into your Power Platform solutions.