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

Community site session details

Session Id :

Batch Telemetry Agent

Prashant Verma Profile Picture Prashant Verma
Batch Telemetry Agent: AI-powered monitoring & diagnostics for D365 F&SCM

Overview

The Batch Telemetry Agent is an AI-powered monitoring and diagnostic Copilot Studio agent for Dynamics 365 Finance & Supply Chain Management focused on batch job framework observability. It integrates Azure Application Insights telemetry with Copilot Studio to deliver actionable insights, root-cause analysis (GPT-4/5 ready), and optional auto-remediation guidance.


The challenges the agent addresses

Organizations running D365 F&SCM often want more detailed and automated visibility into batch workloads. Common pain points include difficulty in tracking execution times, limited error observability, difficulty monitoring thread availability, and poor visibility into throttling.
This agent can help you detect exceptions and trace call stack, identify execution patterns, pinpoint performance bottlenecks, recommend optimizations, monitor thread availability, analyze throttling, and handle multi-environment telemetry.

Prerequisites: Monitoring and Telemetry Feature

Dynamics 365 Finance & Supply Chain Management includes a Monitoring and Telemetry capability that sends application telemetry to Azure Application Insights. The Batch Telemetry Agent requires your environment to be configured to capture batch framework telemetry in Azure Application Insights—see the detailed guidance here 👉 Monitoring batch workloads with Application Insights.

Key capabilities

Enables non-developers, but key business, support and IT stakeholders to query batch telemetry via Microsoft copilot studio chat, Teams, M365 Copilot chat and turns complex diagnostics into actionable guidance. Business stakeholders along with admin and support teams to remain proactively aware of the batch framework, rapidly identify and resolve bottlenecks, and finetune job timings—reducing delays and meeting deadlines, while the agent translates technical data into businessfocused recommendations.
  • Intelligent observability: Delivers a unified view of batch job telemetry (jobs, threads, throttling, errors) with environment-aware filtering and timeseries visualization.
  • Anomaly detection & optimization: Can deliver alerts for spikes and unusual patterns, recommending adjustments for scheduling (if paired up with Dynamics 365 ERP MCP server), concurrency, and throttling.
  • GPT-assisted root cause analysis reports: Generates Batch framework analysis reports which are sent over email and team’s channel.
  • Exception detection & tracing: Identifies Infolog errors within specific ranges, highlights top failing jobs, and connects to code-level trace details.
  • Thread availability monitoring: Displays real-time and trending data on available threads, helping to locate clusters of contention.
  • Throttling analysis & alerts: Detects throttling incidents, correlates them with CPU, memory, or SQL DTU usage, and triggers threshold-based alerts.
  • Execution history & comparisons: Accesses job run histories, calculates averages, and provides visual comparisons between two jobs.
  • Multi-environment support: Recognizes shared Application Insights, prompts for environment ID and time, and applies intelligent filters automatically.
  • Action-oriented monitoring: Summarizes findings with recommended next steps, if enabled, can integrate with incident workflow tools such as Azure Dev Ops, confluence etc.

Example Prompts

Example Prompt to get a summary
Generate an analysis of the latest batch jobs from the batch log or ask the agent
to perform batch job analysis”
Responses
Creates a Performance report and sends the detailed analysis on email.





Identifies Execution Patterns
Finds simultaneous job starts, overlapping runs, and recurring clusters, highlights long-running tasks and generates performance reports.

Pinpoints Performance Bottlenecks
Detects resource contention from high concurrency and flags prolonged maintenance jobs that slow processes.

Recommends Optimization Strategies
Suggests scheduling adjustments, throttling, and monitoring improvements to reduce system load and enhance responsiveness.


Example Prompt to get details on errors
“Show me the batch job errors for the past one hour”
Responses



Batch Infolog Errors
1. Retrieve Error Details
The agent fetches Infolog entries for batch jobs within the selected time range (e.g., past hour), including:

Job Caption (e.g., Insights provisioning status check)
Job ID 
Error Message (e.g., Unable to retrieve token. Error: invalid scope)
2. Provide Diagnostic Insights
Displays structured error data and prompts follow-up questions like:
“Would you like to know if the framework was throttled during these errors?”
If throttling is detected, the agent reports CPU, RAM, and SQL DTU metrics; otherwise, it confirms no throttling occurred.
3. Visualize and Summarize
Generates a quick summary of:

Error frequency over time
Top failing jobs
Common exception types
Offers links to detailed traces or call stack for deeper investigation.


Example Prompt to get details on batch job exceptions.
Show me the batch job exceptions for a given date range
Responses




 
Agent Capabilities
1. Detect Exceptions
Find all batch job errors in D365 Finance & Supply Chain.

2. Trace to Call Stack
Locate the exact code point for quick root-cause analysis.

3. Provide Guidance
Chat for fixes or pull tips from Microsoft Learn.

4. Self-Healing Hooks
Future feature: Restart jobs or apply automated recovery actions using D365 ERP MCP server.


Solution setup

The following section outlines the detailed installation procedure.

Step 1: Download the Solution

Step 2: Import the Solution

  • Use one of these options:
    • Power Apps Maker Portal
    • Copilot Studio

Step 3: Verify Connections

  • During import, ensure all required connections are established.

Step 4: Publish Customizations

  • After importing, you’ll see 42 components.
  • Publish all customizations.

Step 5: Manage Connections

  • Once the agent is imported, click Manage Connections to confirm everything is properly linked.

Step 6: Enable Channels

  • Go to Channels and enable:
    • Teams
    • Microsoft 365

Step 7: Enable Code Interpreter and File processing capabilities feature

  • Go to Settings and enable:

Step 8: Republish After Changes

  • If you modify any of the following, republish the agent:
    • Topics
    • Instructions
    • Switch model to Chat GPT-5
    • Add triggers
    • Add MCP tools or connectors

Tip: Keep this checklist handy for quick setup and updates!


Architecture

  • Built on Copilot Studio with connectors for Run Analytics and Visualize Analytics.
  • Uses KQL queries to fetch telemetry from Application Insights.
  • Sources: D365 F&O Batch Framework logs + custom events.
  • Ingestion: Azure Application Insights.

Extensibility options

Expand signal coverage (form views, DMF, Power Platform telemetry), integrate with ServiceNow, DevOps, JIRA, and attach sub-agents for notifications.
  • If enabled can easily include other telemetry information like
    • Form views Telemetry
    • DMF Telemetry
    • Power Platform and Dataverse Telemetry
    • Custom events and traces
    • Operational insights (D365 Commerce)
  • Extensible Integration: ServiceNow, DevOps, JIRA for ticket automation
  • MCP server: Integrates seamlessly with D365 ERP MCP server
  • Agent and Aub agent scenario: Attach a sub agent to get additional telemetry or send notification over email and teams.

Resources

Disclaimer

Please don’t hesitate to share your feedback and ideas for the Agent evolution using the post comments or by contacting us at D365AppInsights@microsoft.com
This is not a release from Dynamics 365 engineering but is a sample agent shared without warranty and for support you can go to the Viva Engage page and not raise MS support tickets
In addition to this Batch Telemetry Agent discussed in this blog post, there are several other sample Agents available on the GitHub repository.
/**
* SAMPLE CODE NOTICE
*
* THIS SAMPLE CODE IS MADE AVAILABLE AS IS.  MICROSOFT MAKES NO WARRANTIES, WHETHER EXPRESS OR IMPLIED,
* OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OR CONDITIONS OF MERCHANTABILITY.
* THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS SAMPLE CODE REMAINS WITH THE USER.
* NO TECHNICAL SUPPORT IS PROVIDED.  YOU MAY NOT DISTRIBUTE THIS CODE UNLESS YOU HAVE A LICENSE AGREEMENT WITH MICROSOFT THAT ALLOWS YOU TO DO SO.
**/

Comments