Skip to main content
Microsoft Copilot Studio is a low-code platform for building copilots and agents on Azure. You don’t instrument the agent directly — it emits telemetry to Azure Application Insights, and an Azure Function forwards that telemetry to HoneyHive.
This integration requires honeyhive Python SDK 1.4.0 or later, which includes the honeyhive.adapters.copilot_studio adapter.

How it works

This guide uses an Event Hub for real-time forwarding. Batched export to Blob Storage also works, with a blob trigger in place of the Event Hub trigger.

How Copilot Studio events map to HoneyHive

The adapter converts AppEvents, AppRequests, and AppDependencies records into spans. AppTraces and similar records carry log signals rather than spans and are skipped; AppExceptions aren’t mapped yet. Each converted record becomes one span: HoneyHive ingests every span as a chain event, and each Copilot Studio conversation shows up as a single session. The event name (user_input, agent_output, and so on) distinguishes each kind, with the message content captured in the event’s inputs and outputs.

Prerequisites

Setup

1

Connect Copilot Studio to Application Insights

In Copilot Studio, open your agent and go to Settings > Advanced > Application Insights. Paste the connection string from your Application Insights resource, then enable:
  • Enable logging so incoming and outgoing messages and events are logged
  • Log conversation details so user ID, user name, and message text are captured
Copilot Studio Advanced settings showing the Application Insights connection string field and the Enable logging, Log conversation details, Log sensitive properties, and Node execution events toggles turned on

Copilot Studio Settings > Advanced > Application Insights, with the connection string set and logging options enabled

Message text drives HoneyHive inputs and outputs. Without Log conversation details, Copilot Studio logs events but omits message text, so spans arrive with empty inputs and outputs. Review your privacy requirements before enabling it, since it logs message content.
2

Provision Azure infrastructure

The quickest path is azd init with the official Event Hub Functions template, then replace the generated function_app.py with the forwarder code below:
Minimum required resources:
  • Function App (Flex Consumption or Consumption plan, Python 3.11+)
  • Storage Account (required by the Functions runtime)
  • Event Hub namespace + hub wired to your Copilot Studio diagnostic export
3

Configure Copilot Studio diagnostic export

In the Azure portal, open the Application Insights resource used by your Copilot Studio agent and go to Diagnostic settings > Add diagnostic setting.
  • Select log categories: AppEvents, AppRequests, AppDependencies
  • Set the destination to Stream to an event hub and select your Event Hub namespace and hub
Azure portal Diagnostic setting page named export-to-eventhub, with the Events, Requests, and Dependencies log categories checked and Stream to an event hub selected as the destination

Azure diagnostic setting streaming Events, Requests, and Dependencies to an Event Hub.

4

Forward records with the adapter

The Event Hub trigger unpacks each message’s records array, converts them to spans, and exports them:
copilot_studio_records_to_spans accepts Azure Monitor diagnostic-export records and returns OpenTelemetry ReadableSpan objects, handling trace and session correlation. For batched export, swap the Event Hub trigger for a blob trigger that reads the archived records and passes the same records list to the adapter.Add these dependencies to the project’s requirements.txt:
5

Set application settings

Set the OTLP export settings and the Event Hub connection on the Function App.
Always required:Event Hub trigger:
6

Deploy

Once deployed, the function shows an Azure Event Hubs (event) trigger wired to your forwarder in the Function App’s Integration view.
Azure Function App Integration view for the forward_from_event_hub function, showing an Azure Event Hubs event trigger feeding the function with no outputs defined

The deployed forwarder function with its Azure Event Hubs trigger in the Function App Integration view.

Verify in HoneyHive

1

Generate Copilot Studio activity

Chat with your Copilot Studio agent (the test canvas works) so it emits telemetry to Application Insights and through the diagnostic export.
2

Check forwarded traces

In Traces, search for your agent name. Each conversation appears as one session, with user_input, agent_output, and any agent_error spans carrying the message content as inputs and outputs.
HoneyHive Traces view showing a session with a span tree of user_input, agent_output, and agent_action events, and the selected agent_output span displaying the agent response content in its output panel

A forwarded Copilot Studio session in HoneyHive Traces, with user_input, agent_output, and agent_action spans and the agent response in the output panel.

Optional settings

Set these as Function App application settings:

Troubleshooting

n8n Integration

Forward workflow executions to HoneyHive from an external shipper

Microsoft Semantic Kernel

Instrument code-first Semantic Kernel agents

Tracing Introduction

Sessions, event types, and trace hierarchy

Enrich Your Traces

Add metadata, user properties, and feedback

Resources