Exit Call Management
start_exit_call(bt_handle,exit_type,display_name,identifying_properties,optional_properties=None)
Starts a custom exit call from within the specified business transaction.
There can be only one active exit call per business transaction. Attempts to start subsequent exit calls will return None.
Returns an ExitCallHandle that identifies this exit call.
bt_handle: BTHandle
Identifies the business transaction making the exit call. Handle is returned from start_bt().
exit_type: int
The type of exit call. Valid values are:
appd.EXIT_HTTP
appd.EXIT_DB
appd.EXIT_CACHE
appd.EXIT_QUEUE
display_name:str
Name used to identify this exit call in the controller. This is the label that will be used to display the exit call in the AppDynamics UI.
identifying_properties: dict
A dictionary of name/value pairs that uniquely identify the downstream component being called.
In the Controller UI, these properties are visible in the upper right panel of the backend dashboards.
The key of the dict is the name of the property; the value is the value of the property.
operation: str, optional
A string describing the operation that is being performed, such as the URL of an HTTP request or an SQL query.
optional_properties: dict, optional
A dictionary of name/value pairs that identify additional properties for this exit call. In the Controller UI, these properties are visible in the Exit Calls and Async Activities modal in the snapshot drill-down pane.
end_exit_call(exit_call_handle, exc=None)
Ends the exit call identified by exit_call_handle
.
exit_call_handle: ExitCallHandle
Identifies the exit call being ended. The handle is returned from start_exit_call().
exc: Exception
If an exception occurred during the exit call that you have caught with a
try-except
block, and you wish to report the exception as part of the
exit call, pass the exception as the exc
argument.
make_correlation_header(bt_handle, exit_call_handle)
Make a correlation header for a custom exit call.
If you are performing custom exit calls to other instrumented tiers, adding a correlation header allows continuing business transactions on the downstream tier.
It is up to you to send the header, as well as parse it at the other end and pass it to start_bt().
Returns a tuple of header name and header value, or None if correlation is disabled.
bt_handle: BtHandle
A handle identifying the business transaction.
exit_call_handle: ExitCallHandle
A handle identifying the exit call.