Procedures for colecting and handling traces