Added ability to get traces in batches.