Overview
This tutorial walks you through configuring Business Activity Monitoring (BAM) in Pull Model (Data Queries) mode to track workflows that use Azure Application Insights as the data source. By the end, you will have a business process and transaction configured to query Application Insights, and you will be able to view correlated transaction instances in BAM without instrumenting your Logic Apps with custom checkpoint actions.
Business value
The Pull Model lets you add BAM tracking to workflows that are already emitting telemetry to Application Insights — without modifying the Logic App or adding a custom connector. This makes it ideal for environments where instrumentation changes require change management approval, or where you want tracking on existing workflows immediately. BAM periodically queries Application Insights using the queries you configure, correlates the results into transaction instances, and surfaces them in the same tracking view as Push Model workflows.
Prerequisites
Before starting this tutorial, confirm the following:
- A BAM environment is deployed with the Data Queries type. See Deployment details.
- The target Logic App is configured to send telemetry to an Azure Application Insights workspace.
- You have Read access to the Application Insights resource from the Turbo360 service principal.
- Your Turbo360 account is active and you can access the Business Activity Monitoring module.
Required permissions
| Action | Minimum role |
|---|---|
| Create a business process | Contributor |
| Create a transaction | Contributor |
| Configure stages and data sources | Contributor |
| View transaction instances | Reader |
Dependencies
- The Turbo360 service principal must have at least Reader access on the Application Insights resource in Azure. Without this, BAM cannot execute queries against the workspace.
- Application Insights must be enabled on the Logic App and telemetry must be flowing before BAM can return results. See Managing service principals.
How it works
In the Pull Model, BAM does not receive events from your application. Instead, BAM executes Kusto Query Language (KQL) queries against one or more configured data sources — in this case, Azure Application Insights — on a scheduled basis. Each stage in a transaction is mapped to a KQL query that retrieves the relevant telemetry records.
BAM uses a correlation property to group query results into transaction instances. You define the correlation property — typically a run ID, order ID, or similar unique value present in the Application Insights telemetry — and BAM uses it to link results from different stage queries into a single instance row.
The Data Queries type supports Application Insights, Azure Data Explorer (ADX), and custom REST endpoints as data sources. This tutorial uses Application Insights.
Steps
This tutorial covers four tasks: connecting Application Insights as a data source, creating a business process with Data Queries type, configuring a transaction with stage queries, and verifying instances appear. Navigate to Business Activity Monitoring in the Turbo360 tree view to get started.
Step 1: Confirm the Application Insights data source
BAM uses the service principal configured during environment setup to query Application Insights. Confirm that the Application Insights resource is accessible before proceeding.
- In Turbo360, navigate to Business Activity Monitoring in the tree view.
- Navigate to Business Activity Monitoring > Service principals to review the registered service principal and confirm the Application Insights workspace is accessible. See Managing service principals if you need to register or update the service principal configuration.
- Verify that the service principal has Reader access on the Application Insights resource in Azure before continuing.
:::(Info )(Note:)
If you have not yet registered Application Insights as a data source for this BAM environment, complete the service principal setup steps in Managing service principals before continuing.
:::
Step 2: Create a business process with Data Queries type
Create a business process and ensure it is configured for the Data Queries deployment type.
- In the tree view, click the Context menu ( ⋮ ) next to a business process group and select New Business Process, or use the Actions dropdown on the BAM homepage.
- Enter a Tracking name — for example,
order-processing-appinsights. - Enter a Friendly name — for example,
Order Processing (App Insights). - The business process type is determined by your BAM environment deployment type. In a Data Queries environment, the process will automatically use Data Queries tracking.
- Click Save.
Step 3: Add a transaction and configure stage queries
Add a transaction and configure each stage to query Application Insights for the relevant telemetry.
- Click the Context menu ( ⋮ ) next to the new business process and select New Transaction.
- Enter a Tracking name — for example,
process-order-appinsights. - Enter a Friendly name — for example,
Process Order. - Select the Data source as Application Insights and select the registered Application Insights resource.
- Click Save.
Now add stages with KQL queries:
- Click the Context menu ( ⋮ ) next to the transaction and select New Stage.
- Enter a Stage name — for example,
Order Received. - In the Stage query field, enter a KQL query that retrieves records corresponding to this stage. For example, to find Logic App runs that reached a specific action:
requests
| where name == "OrderReceivedAction"
| project timestamp, operation_Id, resultCode
- Set the Correlation property to the field that identifies a unique workflow run — for example,
operation_Id. This value must be consistent across all stage queries for the same transaction. - Click Save.
- Repeat to add additional stages. For each stage, write a KQL query that returns records for that checkpoint, and use the same correlation property field.
- For the final stage, enable Mark as final stage.
:::(Info)(Note:)
The correlation property field name must be identical across all stage queries in the same transaction. BAM uses this value to group results into a single instance row. If the field name differs between stages, BAM cannot correlate the results.
:::
Step 4: Trigger and verify instances
Trigger the Logic App to generate new Application Insights telemetry, then wait for BAM to execute its next query cycle and verify that instances appear.
- Trigger the Logic App by sending a test request or running it manually from the Azure portal.
- Confirm telemetry has been recorded in Application Insights by running the stage query manually in the Application Insights Logs blade. Verify it returns results for the run you triggered.
- In Turbo360, navigate to Business Activity Monitoring > your business process > your transaction in the tree view.
- Click the Context menu ( ⋮ ) next to the transaction and select View Instances.
- Wait for BAM to complete its next query cycle. The evaluation frequency is configurable per business process — check the Rules evaluation frequency setting in your business process configuration to know the current interval.
- Confirm that a transaction instance appears with all configured stages populated.
Troubleshooting
-
No transaction instances appear after the Logic App run
Cause: BAM has not yet completed a query cycle, or the KQL query returns no results for the time window covered by the cycle.
Fix: Wait for the next query cycle to complete. If instances still do not appear, run the KQL query manually in Application Insights Logs and confirm it returns records for the test run. -
Stages from different runs are being merged into the same instance
Cause: The correlation property field does not contain a unique value per workflow run — for example, ifoperation_ParentIdis used instead ofoperation_Id.
Fix: Review the correlation property field in the stage configuration and verify it uniquely identifies a single workflow run in your telemetry. Switch to a more specific field if needed. -
One stage shows data but another stage shows no data
Cause: The KQL query for the empty stage does not return records, or the field name used as the correlation property differs between stages.
Fix: Run each stage's KQL query independently in Application Insights Logs. Confirm both return records and that the correlation property field name is identical across all stage queries. -
Service principal authentication error when querying Application Insights
Cause: The Turbo360 service principal does not have Reader access on the Application Insights resource.
Fix: In the Azure portal, navigate to the Application Insights resource > Access control (IAM) and add the Turbo360 service principal with the Reader role. See Managing service principals. -
KQL query returns results in Application Insights but not in BAM
Cause: The query uses time filters (for example,| where timestamp > ago(1h)) that fall outside the BAM query window, or the query references a table not supported by the BAM integration.
Fix: Remove relative time filters from stage queries — BAM manages the time window for each query cycle. Use onlyrequests,dependencies,traces,exceptions, orcustomEventstables.