Former prime minister Julia Gillard is self-isolating after embracing Sophie Trudeau a week before she tested positive for coronavirus.

The Canadian prime minister’s wife attended a We Day function with Ms Gillard in London earlier this month.

“Ms Gillard is in London and feeling well, but as a precaution is self-isolating and will continue to do so until the end of the recommended period,” a spokeswoman for the former prime minister told AAP on Tuesday.