# 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<tenant-admin-center-manage-consumption-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
Dimension|Description or value
message|AI Consumption Recorded
### Custom dimensions
Dimension|Description or value
aadTenantId|Specifies 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.
actions|The action that consumed Copilot Credits, for example 'Outbound Message' for Sales Order Agent
agentTaskId|The task ID of the agent task that consumed Copilot Credits
companyName|The name of the company in which the agent that consumed Copilot Credits ran
component|Dynamics 365 Business Central Server
componentVersion|The version number of the Dynamics 365 Business Central server
consumptionDateTime|The date and time at which Copilot Credit consumption was recorded
copilotCredits|The number of Copilot Credits consumed for the recorded action
copilotStudioFeature|The Copilot Studio Agent feature<https://learn.microsoft.com/microsoft-copilot-studio/requirements-messages-management#copilot-credits-billing-rates> used to record Copilot consumption
description|A description of the action that consumed Copilot Credits
environmentName|Specifies the name of the tenant environment. See Managing Environments<tenant-admin-center-environments>.
environmentType|Specifies the environment type for the tenant, such as Production or Sandbox. See tenant-admin-center-environments#types-of-environments.
eventId|RT0055
extensionId|The extension ID of the app associated with the agent that consumed Copilot Credits
extensionName|The name of the extension associated with the agent that consumed Copilot Credits
extensionPublisher|The publisher name for the extension associated with the agent that consumed Copilot Credits
extensionVersion|The version number of the extension associated with the agent that consumed Copilot Credits
externalConsumptionId|A GUID representing the Copilot Credit consumption event
featureName|Name of the feature that consumed the Copilot Credits
telemetrySchemaVersion|0.2
### Sample KQL code
This KQL code can help you get started analyzing consumed Copilot Credits:
```kql
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
```
## Related information
Manage consumption-based billing for agent capabilities<tenant-admin-center-manage-consumption-billing>
telemetry-overview
Turn environment telemetry on or off<telemetry-enable-application-insights>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-ai-consumption, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/administration/telemetry-ai-consumption/
