Ejemplo n.º 1
0
func BeginGenericSegment(txnID int64, parentID int64, name string) int64 {
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))
	id := C.newrelic_segment_generic_begin(C.long(txnID), C.long(parentID), cname)
	return int64(id)
}
Ejemplo n.º 2
0
/*
 * Identify the beginning of a segment that performs a generic operation. This
 * type of segment does not create metrics, but can show up in a transaction
 * trace if a transaction is slow enough.
 *
 * @param transaction_id  id of transaction
 * @param parent_segment_id  id of parent segment
 * @param name  name to represent segment
 * @return  segment id on success, else negative warning code or error code
 */
func SegmentGenericBegin(id, parent int64, name string) (int64, error) {
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))

	return errNoLong(C.newrelic_segment_generic_begin(C.long(id), C.long(parent), cname))
}