This question already has an answer here:
Harry and Cedric both had the trace. All three unforgivable curses were cast in their presence.
The trace tells you what spell is cast, where it's cast, and who is the presence of it.
We know this, because the Ministry knew that the Patronus charm was cast in the presence of Dudley.
How, exactly, did they not know Voldemort had returned, and killed Cedric?