He clocked 10 minutes and 43.09 seconds in the 3000m race walk at the London Stadium.
Bosworth said: “It was a shock to do that. I’ve just come back from altitude training but I still wanted to see what I could do and this is all heading in the right direction for the Europeans.”
Zharnel Hughes insists he can handle being favourite for the European sprint title.
The 23-year-old ran 9.93secs in the 100m final to finish second behind the USA’s Ronnie Baker.
It underlined his favourite tag ahead of at the European Championships in Berlin next month – with British team-mates Reece Prescod and CJ Ujah opting not to race in the Diamond League meet.
He said: “Yeah, definitely I can cope. Coach (Glen) Mills has been a great coach for me this season and he’s made me mentally strong as well.
“For me, its just going out there and holding my own and trying not to get ahead of myself with the times, and realising that I’m the favourite going in. I need to stay relaxed.
“I’m really happy, especially going into the European Championships in the next two weeks. This is a confidence-booster for me. I came back after trials and put the work in.”
Hughes clocked 9.97secs to win his heat after Christian Coleman pulled out with a hamstring injury.
A depleted field in heat one saw world and European indoor 60m hurdle champion Andy Pozzi run, setting a personal best of 10.44 seconds.
Jamaica’s Shelly-Ann Fraser-Pryce won the women’s 100m in 10.98, having only returned to competition in June following the birth of her son last August.
The USA’s Dezerea Bryant and Jamaica’s Jonielle Smith were second and third with Brits Imani-Lara Lansiquot and Bianca Williams fifth and seventh respectively,
Shara Proctor won the long jump in 6.91m ahead of Lorraine Ugen (6.88m) with Katarina Johnson-Thompson fifth with 6.70m.