[][src]Function newrelic_sys::newrelic_start_segment

pub unsafe extern "C" fn newrelic_start_segment(
    transaction: *mut newrelic_txn_t,
    name: *const c_char,
    category: *const c_char
) -> *mut newrelic_segment_t

@brief Record the start of a custom segment in a transaction.

Given an active transaction this function creates a custom segment to be recorded as part of the transaction. A subsequent call to newrelic_end_segment() records the end of the segment.

@param [in] transaction An active transaction. @param [in] name The segment name. If NULL or an invalid name is passed, this defaults to "Unnamed segment". @param [in] category The segment category. If NULL or an invalid category is passed, this defaults to "Custom".

@return A pointer to a valid custom segment; NULL otherwise.