It's a good thing you were paying attention to what was happening around you.
この場合、次のような言い方ができますよ。
ーYou were really onto that thief, weren't you?
「泥棒によく気づいたよね」
to be onto で「事実に気づく」という意味があります。
ーIt's a good thing you were paying attention to what was happening around you.
「あなたが周りで起こっていることに注意を払っていて良かったよ」
このような言い方もできると思います。
ご参考まで!