Stopping the Trace

Stop appending trace data to the business transaction (BTX) and finish creating the BTX.

The stopTrace() method also retrieves the BTX byte array from the BTX writer and returns it to the calling code for further use (upload). Because the stopTrace() call clears the BTX from memory, you must make sure to save the BTX for further use, such as uploading the trace.

NSData *btx = [ [SUPE2ETraceServiceImpl getInstance]  stopTrace];