This topic describes how transaction correlation works in the Java environment. In principle, it works largely the same for .NET and the other language agents.
Transaction correlation enables AppDynamics to do distributed transaction tracing in modern web applications. Transaction correlation provides the ability to draw the application flow map and depict the flow of business transactions across multiple tiers and to external services.
Transaction correlation maintains the business transaction context across all tiers and threads as the requests are processed. Whatever the transaction does across all these tiers is counted as an activity for that business transaction.
Originating tier/segment - Tier 1 in the diagram is where the first significant entry point is discovered, named, and instrumented. This is called the originating tier.
Continuing tier/segment (or downstream tier) - every other thread spawned in the same JVM or externally is considered a continuing segment or continuing tier. In the diagram, tiers 2, 3, and 4, and the JMS /Messaging Bus are continuing/downstream segments. Metrics are reported to the controller for each segment.
For Remote Calls (JVM->JVM and CLR->CLR)
For Async threads (intra-JVM and intra-CLR)
When done the right way, this does not change application behavior. AppDynamics agents only add where there is extensibility, such as found in HTTP headers and JMS properties. Every "transaction segment" reports its own metrics.
This diagram shows how the context is maintained across tiers for various mediums.
We add a header for HTTP calls, because by definition, the headers are extensible. The name of AppDynamics' header for propagating correlation information is "
Adding custom headers to carry transaction information is safe when:
This diagram illustrates the generic structure of an HTTP request. When a client tier makes an HTTP call, the AppDynamics byte code interceptor adds a safe header that uniquely identifies this transaction. The AppDynamics byte code interceptor on the receiving Servlet (for example), reads the header and carries forward the transaction context. The controller reconstructs the flow based on the information received from each node in the flow.
We add a message property for JMS calls, because by definition, the message properties are extensible. Adding custom message properties to carry transaction information is safe when:
This diagram illustrates the generic structure of a JMS call.
The following diagram shows the contents of the AppDynamics correlation header.
If the underlying framework/API is not supported by out of the box correlation by AppDynamics, then there is a provision to come up with the custom configurations by analyzing the flow of the transaction.
For more details, refer to:
Cross application flows show the performance impact between business applications within a Controller account. For environments that require a larger picture of business performance, federated cross application flows allow AppDynamics to correlate business transactions across business applications in different accounts that may be on different Controllers. For details, refer to:
Published on 05-06-2015.