tx.go
func (t *tx) Start() (err error) {
	if t.id != 0 {
		return ErrTxAlreadyStarted
	}
	if t.id, err = t.Tracer.BeginTransaction(); err != nil {
		return err
	}
	if err = t.Tracer.SetTransactionName(t.id, t.name); err != nil {
		return err
	}
	if err = t.Tracer.SetTransactionType(t.id, t.txnType); err != nil {
		return err
	}
	if t.url != "" {
		if err = t.Tracer.SetTransactionRequestURL(t.id, t.url); err != nil {

			return err
		}
	}
	if t.category != "" {
		if err = t.Tracer.SetTransactionCategory(t.id, t.category); err != nil {
			return err
		}
	}

	return nil
}
func (t *tx) Start() (err error) {
	if t.id != 0 {
		return ErrTxAlreadyStarted
	}
	if t.id, err = t.Tracer.BeginTransaction(); err != nil {
		return err
	}
	if err = t.Tracer.SetTransactionName(t.id, t.name); err != nil {
		return err
	}
	if err = t.Tracer.SetTransactionType(t.id, t.txnType); err != nil {
		return err
	}
	if t.url != "" {
		if err = t.Tracer.SetTransactionRequestURL(t.id, t.url); err != nil {

			return err
		}
	}
	if t.category != "" {
		if err = t.Tracer.SetTransactionCategory(t.id, t.category); err != nil {
			return err
		}
	}

	return nil
}
func ( t * tx ) Start ( ) ( err error ) { if t . id != 0 { return ErrTxAlreadyStarted } if t . id , err = t . Tracer . BeginTransaction ( ) ; err != nil { return err } if err = t . Tracer . SetTransactionName ( t . id , t . name ) ; err != nil { return err } if err = t . Tracer . SetTransactionType ( t . id , t . txnType ) ; err != nil { return err } if t . url != " " { if err = t . Tracer . SetTransactionRequestURL ( t . id , t . url ) ; err != nil { return err } } if t . category != " " { if err = t . Tracer . SetTransactionCategory ( t . id , t . category ) ; err != nil { return err } } return nil }
// Start starts a transaction, setting the id.
Start starts a transaction setting the id .