Overview
This article covers problems that come from how you send tracking data to Business Activity Monitoring (BAM) and which model you choose. It covers instances that do not appear, duplicate instances, reprocessed messages that create new instances, and features that are not available on a transaction.
Business value
Tracking problems are often silent. Your integration runs without errors, but BAM shows missing or duplicated data. Knowing the usual causes helps you restore accurate tracking quickly and avoid building monitoring on the wrong model.
How it works
BAM supports two models. In the Push Model (Custom Logging), your integration sends events to the BAM API. In the Pull Model (Data Queries), BAM queries your data source on a schedule. Each transaction uses one of the two types.
BAM links the events of one operation by using its Transaction Instance ID. Reprocessing, duration monitoring, and exception monitoring are available only in the Push Model. The Pull Model supports query monitoring only.
Troubleshooting
-
Transaction instances do not appear after you send tracking events
Cause: The Function App URL or API key in your integration is incorrect or truncated, or the key is not passed the way the endpoint expects. A 401 Unauthorized response means the key is missing or passed in the wrong place. A 404 Not Found response means the host URL is wrong or the Function App is not running.
Fix: Go to Business Activity Monitoring > Settings > Configuration > Connection details and copy the Function App URL and API key again, with no trailing spaces. Pass the key either as?code=<ApiKey>in the URL or in thex-functions-keyheader, not both. Confirm that the Function App is running in the Azure portal, then send a test event. -
Duplicate instances appear for the same business operation
Cause: The same operation is tracked by both a Custom Logging (Push) transaction and a Data Queries (Pull) transaction. This often happens after you move an integration to the Push Model and leave the Pull transaction in place. A single transaction cannot combine the two types.
Fix: Track each operation with one model. When the Push Model transaction is live, retire the matching Pull Model transaction. -
A reprocessed message creates a new instance instead of updating the original
Cause: The Transaction Instance ID comes from a value that Azure generates, such as a Logic App run ID or a Service Bus message ID. These values change when you reprocess, so BAM creates a new instance. Reprocessed instances in a batch also get a newTransactionInstanceIdand are not linked to the original batch.
Fix: Use a stable business key, such as an order number or invoice ID, as the Transaction Instance ID. For batches, pass the original parent'sTransactionInstanceIdin theBAM-BatchIdheader of the reprocessed message. -
Reprocessing, duration monitoring, or exception monitoring is not available for a transaction
Cause: The transaction uses the Data Queries (Pull) type. Reprocessing, duration monitoring, and exception monitoring are available only for Custom Logging (Push) transactions.
Fix: Track operations that need these features with a Custom Logging transaction. To keep a Pull Model transaction, use query monitoring to alert on it.