trace filter API with write(buffer) / flush