Manage Exit Calls

When an application makes a call to another component, such as a detected backend or another application server, the agent reports metrics on those calls.

Define an exit call by enclosing the code that constitutes the exit call between

StartExitCall() and EndExitcall() calls. StartExitcall() returns a handle to use in subsequent routines that affect that exit call. An exit call occurs in the context of a Business Transaction.

You can optionally store the exit call handle in the global handle registry with a guid for easy retrieval later using StoreExitcall(). Retrieve the handle from the global handle registry using GetExitcall().

You can optionally add details to an exit call as any arbitrary string with SetExitcallDetails(). The details are reported in the exit call details in the transaction snapshots in the Controller UI:

Exit Calls

You can also add errors to an exit call using AddExitcallError(). Use the enum for the error levels. You can also add an error message.

Simple Exit Call Example

// start the exit call to backendName
ecHandle := appd.StartExitcall(btHandle, backendName)
...
// optionally store the handle in the global registry
appd.StoreExitcall(ecHandle, my_ec_guid)
...
// retrieve a stored handle from the global registry
myEcHandle := appd.GetExitcall(my_ec_guid)
// set the exit call details
if err := appd.SetExitcallDetails(myEcHandle, "Exitcall Detail String"); err != nil {
log.Print(err)
}
// add an error to the exit call
appd.AddExitcallError(myEcHandle, appd.APPD_LEVEL_ERROR, "exitcall error!", true)
// end the exit call
appd.EndExitcall(myEcHandle)