[][src]Function newrelic_sys::newrelic_start_external_segment

pub unsafe extern "C" fn newrelic_start_external_segment(
    transaction: *mut newrelic_txn_t,
    params: *const newrelic_external_segment_params_t
) -> *mut newrelic_segment_t

@brief Start recording an external segment within a transaction.

Given an active transaction, this function creates an external segment inside of the transaction and marks it as having been started. An external segment is generally used to represent a HTTP or RPC request.

@param [in] transaction An active transaction. @param [in] params The parameters describing the external request. All parameters are copied, and no references to the pointers provided are kept after this function returns. @return A pointer to an external segment, which may then be provided to newrelic_end_segment() when the external request is complete. If an error occurs when creating the external segment, NULL is returned, and a log message will be written to the SDK log at LOG_ERROR level.