Telemetry FAQ (Frequently Asked Questions)
This article addresses some of the most frequently asked questions around Business Central telemetry in Azure Application Insights.
How do I enable telemetry on environments?
To send telemetry data to Azure Application Insights, you must have an Application Insights resource in Azure. Once you have the Azure Application Insights resource, you can start to configure your environments and apps/extensions to send telemetry data to it. Learn more at Enable Sending Telemetry to Application Insights.
How do I enable telemetry for apps/extensions?
To set up an app/extension to send telemetry data to Azure Application Insights, you need to add the Azure Application Insights connection string to the extension's app.json.
For more information, see Sending Extension Telemetry to Azure Application Insights.
What does it cost?
Azure Application Insights is billed based on the volume of telemetry data your application sends (data ingestion) and how long time you want data to be available (data retention).
Check the Azure Application Insights documentation for up-to-date information on pricing: https://azure.microsoft.com/pricing/details/monitor/.
Can I control telemetry cost?
To control data ingestion cost, you can:
- sample to only ingest a percentage of the inbound data (learn more at Sampling in Application Insights.
- set a daily limit of how much data can be ingested
- set alerts on cost thresholds being exceeded to get notified when it happens
- use data collection rules (DCR) to filter the type of data you want
- use a custom endpoint (go to section)
The first three options for controlling data ingestion cost in Azure Application Insights are found under configure, usage, and estimated costs. Data collection rules are defined on your workspace under the menu item Tables.
How can I see what telemetry Business Central emits?
See an overview at Telemetry overview.
How can I see which telemetry events are most common in my Application Insights?
The easiest way to see the data distribution of different event IDs in your Azure Application Insights resource is to use the Data in Telemetry page on the Administration report in the Power BI app on telemetry data.
You can also run the KQL queries below.
// 30 day overview of event ingestion in your Application Insights resource
let lookback = 30d ;
let traces_stats =
traces
| where timestamp > ago(lookback)
| extend eventId = tostring( customDimensions.eventId )
| summarize count() by eventId
| extend table_name = 'traces'
| project eventId, table_name, count_
;
let pageview_stats =
pageViews
| where timestamp > ago(lookback)
| extend eventId = tostring( customDimensions.eventID )
| summarize count() by eventId
| extend table_name = 'pageViews'
| project eventId, table_name, count_
;
traces_stats
| union pageview_stats
| order by count_ desc
| project eventId, table_name, event_count=count_
| order by event_count desc
Similarly, you can see the data distribution of different environments in your Azure Application Insights resource, by running the KQL queries below.
// 30 day overview of data ingestion by environment in your Application Insights resource
let lookback = 30d ;
union traces, pageViews
| where timestamp > ago(lookback)
| extend aadTenantId = tostring( customDimensions.aadTenantId )
, environmentName = tostring( customDimensions.environmentName )
| summarize count() by aadTenantId, environmentName
| project aadTenantId, environmentName, count_
| order by aadTenantId, environmentName
Can I query telemetry from Azure Log Analytics?
Yes. Learn more at How can I query telemetry from Azure Log Analytics?.
Why do I see _1, _2 in custom dimensions?
Each event has a customDimensions
column that includes a set of dimensions containing metrics specific to the event. Each of these custom dimensions has a limit of 8,000 characters. When logging an event with a dimension exceeding 8,000 characters, the Business Central Server adds more overflow dimension keys to the event to contain the excess characters. There can be up to two extra overflow dimension keys, each with a maximum 8,000 characters. The overflow dimension keys are named <dimension_key_name>_1
and <dimension_key_name>_2
, where <dimension_key>
is the name of the original dimension key. So if the custom dimension key is extensionCompilationDependencyList
, then the overflow dimension keys would be extensionCompilationDependencyList_1
and extensionCompilationDependencyList_2
.
Note
The 8000 character limit is governed by the Application Insights API.
Should each customer/app have their own Application Insights resource, rather than one insight for multiple customers/apps?
Partitioning of Azure Application Insights resources across multiple customers or apps depends on what you use telemetry for. The benefit of having a one-to-one relationship between customers/apps and Azure Application Insights resources is that you can also use the Usage features in the Azure Application Insights portal to monitor how a particular customer is using Business Central. And you can set up and share the Power BI app with the customer directly without having to fear that one customer can see data from another customer. It also makes it easy to separate the cost of telemetry per customer/app. Downside of a one-to-one relationship between customers/apps and Azure Application Insights resources is that you have more Azure resources to manage, including any cross-customer alerting/monitoring you might want to set up.
Also, it's recommended to separate per-environment telemetry from per-app telemetry into separate Azure Application Insights resources.
What is the data retention policy in Azure Application Insights?
You can set the workspace default retention policy in the Azure portal to 30, 31, 60, 90, 120, 180, 270, 365, 550, and 730 days. It's also possible to set a different policy for specific tables.
See Configure the default workspace retention policy
How do I delete data from Azure Application Insights?
You can purge data in an Azure Application Insights resource by using the purge REST API and set a set of user-defined filters.
See Application Insights purge API.
Can I grant read-only access to Azure Application Insights?
Yes. To grant a person read-only access to Azure Application Insights, go to the Access control (IAM) page in the Azure Application Insights portal, and then add the role assignment "Reader" to the person.
You might also need to add the role assignment "Reader" to the person on the Resource Group for the Azure Application Insights subscription.
What about privacy laws and regulations?
The Business Central service doesn't emit any personal or customer data to Application Insights. So the telemetry is born privacy compliant. The service only emits data generated while running the service or program and data that identifies a tenant, general configuration data, or usage data. This data isn't linkable to a user and doesn't contain customer data.
Can I get telemetry in Azure Application Insights for on-premises installations?
Yes, telemetry also works for on-premises installations (private or public cloud). A few events aren't emitted with Business Central on-premises. For an overview of events not emitted, see Telemetry overview.
For information about how to enable telemetry on-premises, see Enable environment telemetry.
Will you backport the Application Insights instrumentation to versions earlier than 15.0?
It took much refactoring in the server and client to make this capability happen. So it's unlikely that we'll backport the Application Insights instrumentation to versions before version 15.0.
For each new signal type we add, we try to backport to the current major release, if possible.
How can I get the Power BI reports on telemetry?
To make it simple to analyze Business Central telemetry, we developed two Power BI apps available from Microsoft AppSource. One app is for telemetry on environments. The other one is for telemetry on apps/extensions (the telemetry defined in app.json). Both apps are free and open source but requires Power BI pro licenses to use.
Read more here: Analyze telemetry with Power BI
Where can I learn more about KQL?
Go to Kusto Query Language (KQL) in the Azure Data Explorer documentation.
I know SQL. How do I do that in KQL?
If you're familiar with SQL and want to learn KQL, you can use Azure Data Explorer to translate SQL queries into KQL. To translate an SQL query, preface the SQL query with a comment line, --
, and the keyword explain. The output will show the KQL version of the query, which can help you understand the KQL syntax and concepts. You can also use the SQL to Kusto cheat sheet from the Azure Data Explorer documentation.
Read more in the article I know SQL. How do I do that in KQL?.
Which tools can I use (KQL editors and clients)?
To get an overview of the different tools, go to Azure Data Explorer tools and integrations overview in the Azure Data Explorer documentation.
Can I follow a session in telemetry?
Yes. Learn more at KQL example - following telemetry events for a session.
Can I follow telemetry events for a user in telemetry?
Yes, if a telemetry ID is assigned to the user. Learn more at KQL example - following telemetry events for a user.
Where can I find telemetry sample code?
Go to Business Central BCTech repository on GitHub.