Defender Kieran Trippier is leaving Newcastle United after his contract expires this summer, marking the end of a significant spell for the club.