Skip to content

Latest commit

 

History

History

README.md

Monitor your Copilot declarative agents using TypeSpec and Application Insights

Summary

This sample demonstrates how to integrate Azure Application Insights into existing Copilot "pro-code" declarative agents using TypeSpec and API plugins. This generic approach, combined with strategic prompting techniques, enables us to capture meaningful metrics for declarative agents.

The following blog post describes the complete solution setup: https://blog.franckcornu.com/post/add-app-insights-procode-copilot-da/

"Architecture"

"Developer debug API plugin"

"Application Insights Logs"

Contributors

Version history

Version Date Comments
1.0 August 12, 2025 Initial solution

Prerequisites

Minimal path to awesome

  1. Clone this repository
  2. In Azure, create a new Azure Logic App as mentionned here: https://blog.franckcornu.com/post/add-app-insights-procode-copilot-da
  3. In the env.dev file, fill the following values extracted from the Logic App HTTP Trigger URL:

"Logic App"

LOGIC_APP_SERVER_URL=https://prod-27.<region>.logic.azure.com:443
LOGIC_APP_INVOKE_PATH=/workflows/<GUID>/triggers/<trigger_name>/paths/invoke
LOGIC_APP_TRIGGER_PATH=/triggers/<trigger_name>/run
  1. From Microsoft 365 Agents Toolkit, sign-in to your Microsoft 365 account.
  2. From Microsoft 365 Agents, provision the solution to create the Teams app.
  3. Go to https://www.office.com/chat?auth=2 URL and enable the developer mode by using the -developer on prompt.
  4. Ask a question like "What are my latest documents?". You should see the plugin triggered and data sent to the Logic App/Application Insights.

Features

The following sample demonstrates the following concepts:

  • Use Logic App as an API plugin by using specific endpoint and instructions.
  • Pass parameter from the LLM context

Help

Search for: da-appinsights-plugin-typespec

Search for: @FranckyC

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

You can try looking at issues related to this sample to see if anybody else is having the same issues.

If you encounter any issues using this sample, create a new issue.

Finally, if you have an idea for improvement, make a suggestion.

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.