func NameWebTransaction(transactionId TTransactionId, name string) int {
	cName := C.CString(name)
	defer C.free(unsafe.Pointer(cName))

	result := C.newrelic_transaction_set_name(C.long(transactionId), cName)
	return int(result)
}
func SetTransactionName(txnID int64, name string) error {
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))
	rv := C.newrelic_transaction_set_name(C.long(txnID), cname)
	return nrError(rv, "set transaction name")
}
Esempio n. 3
0
/*
 * Set the name of a transaction.
 *
 * @param transaction_id  id of transaction
 * @param name  transaction name
 * @return  0 on success, else negative warning code or error code
 */
func TransactionSetName(id int64, name string) (int, error) {
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))

	return errNo(C.newrelic_transaction_set_name(C.long(id), cname))
}