In a typical web application, the user communicates with the application via HTTP requests; these requests access the application server and render the requested data back to the user. Aside from these web transactions, there could be a number of transactions being executed in an application. These transactions may not be triggered by the user but they're still vital for the application to properly function. In general, transactions that do not come under user purview are considered background transactions.
Common examples include maintenance, schedulers, messaging, data archiving, etc. Since these transactions run in the background, it's easy to overlook their performance. You often won't know if these transactions are successful or not unless a major issue bogs down your entire application. This is why monitoring background transactions is essential for quickly debugging errors. APM Insight also captures these transactions and list them under Background tab in APM Insight dashboard.
Note: This feature is available in .NET & Java agents only.
Unlike web transactions, which are implemented using known frameworks like Struts, Play, Spring, etc., background transactions are custom-coded by developers to meet their specific needs and requirements. These are not captured by the APM Insight agent by default, but can be monitored using custom instrumentation.
With custom instrumentation, you can use defined methods and classes. Include the specified code at the beginning of a method or class, and the agent will start tracking its performance.
Note: Standalone HTTP URLs are no longer tracked as background transactions, i.e, background transaction with only HTTP call will no longer be monitored as background transaction. If they are part of any other transaction, only then they will be tracked.
Configuration for background transactions is explained below:
Configuration | Description | Default Value |
---|---|---|
bgtransaction.tracking.enabled |
|
true |
bgtransaction.trace.enabled |
|
true |
bgtransaction.trace.threshold |
|
5 (seconds) |
bgtransaction.record.cputime.enabled |
|
false |
bgtransaction.record.memory.allocation.enabled |
|
true |
bgtransaction.trace.external.components.count.threshold |
|
40 |
bgtransaction.tracking.request.interval |
|
1 (request) for Java & 5 for .Net agent |