Analyzing AI consumption trace telemetry

APPLIES TO: Business Central online

Environment lifecycle telemetry gathers data about the Copilot Credits consumed by features subject to consumption-based billing.

AI consumption recorded

Occurs when Copilot Credits are consumed. The event reports consumption data for all features that use consumption-based billing through environment telemetry. For extension telemetry, it reports only consumption associated with agents that are published to an environment as part of the app.

General dimensions

DimensionDescription or value
messageAI Consumption Recorded

Custom dimensions

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
actionsThe action that consumed Copilot Credits, for example 'Outbound Message' for Sales Order Agent
agentTaskIdThe task ID of the agent task that consumed Copilot Credits
companyNameThe name of the company in which the agent that consumed Copilot Credits ran
componentDynamics 365 Business Central Server
componentVersionThe version number of the Dynamics 365 Business Central server
consumptionDateTimeThe date and time at which Copilot Credit consumption was recorded
copilotCreditsThe number of Copilot Credits consumed for the recorded action
copilotStudioFeatureThe Copilot Studio Agent feature used to record Copilot consumption
descriptionA description of the action that consumed Copilot Credits
environmentNameSpecifies the name of the tenant environment. Learn more in Managing Environments.
environmentTypeSpecifies the environment type for the tenant, such as Production or Sandbox. Learn more in Environment Types.
eventIdRT0055
extensionIdThe extension ID of the app associated with the agent that consumed Copilot Credits
extensionNameThe name of the extension associated with the agent that consumed Copilot Credits
extensionPublisherThe publisher name for the extension associated with the agent that consumed Copilot Credits
extensionVersionThe version number of the extension associated with the agent that consumed Copilot Credits
externalConsumptionIdA GUID representing the Copilot Credit consumption event
featureNameName of the feature that consumed the Copilot Credits
telemetrySchemaVersion0.2

Sample KQL code

This KQL code can help you get started analyzing consumed Copilot Credits:

traces
| where timestamp > ago(30d) // adjust as needed
| where customDimensions.eventId == 'RT0055'
| project timestamp
, message
, aadTenantId = customDimensions.aadTenantId
, actions = customDimensions.actions
, agentTaskId = customDimensions.agentTaskId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, copilotCredits = customDimensions.copilotCredits
, copilotStudioFeature = customDimensions.copilotStudioFeature
, featureName = customDimensions.featureName

Manage consumption-based billing for agent capabilities
Telemetry overview
Turn environment telemetry on or off