Transaction Correlation Management
appd.parseCorrelationInfo(source)
source:
String orHttpRequest
Describes the upstream transaction with which to correlate. If a HttpRequest
object is passed, it must have a transaction correlation header attached.
On success, returns a CorrelationHeader
object that can be used by startTransaction() to create a transaction that is correlated with the upstream transaction described by source
. Returns false
if source
could not be parsed. This can occur if the source is an HTTP request with no correlation header attached or the string parameter is not recognized as a correlation header.
HTTP requests made through the standard http.request()
API have correlation information added automatically. You can correlate a custom transaction created in response to an HTTP request made from another Node.js process by passing the incoming request as source
.
For other exit call types, you need to define how correlation information is attached to the originating transaction and retrieved in the downstream transaction.
TimePromise.prototype.createCorrelationInfo(exitCall, doNotResolve)
exitCall:
ExitCalldoNotResolve:
optional, true|false
The input exitCall
is one of the following:
- For a custom exit call, value returned from startExitCall().
- For an automatically-detected exit call, input parameter to the beforeExitCall() callback.
Set the doNotResolve
parameter to true
if you do not want the backend to be resolved to a tier. It defaults to false, which means that the backend is resolved to the calling tier. You may want to set this for an exit call to a service, such as a messaging queue, that does not have a 1:1 relationship between the consumer and producer of the service. For more information see Resolve Remote Services to Tiers.
Returns a string-encoded correlation header, which a downstream transaction can use to correlate with this transaction.