Former City captain Kompany played under Guardiola from 2016-19 before leaving to join Anderlecht as player-manager.
The former Manchester City captain said he was targeted by racist insults during the game against Club Brugge and said his players and staff were also subjected to racist abuse.
A member of the recently created Fifpro's global player council, Kompany said that football's main problem when tackling racism lies in the fact that the people controlling the game are not directly confronted with discrimination.
Vincent Kompany's Anderlecht slumped to a comeback defeat to the league leaders Club Brugge eventually to lose 2-1, even after taking an early lead through Antoine Colassin.
Manchester City did not replace central defender Vincent Kompany when he left the Etihad Stadium for Anderlecht in May, while the champions have since lost Aymeric Laporte to a long-term injury.
Vincent Kompany made 360 appearances for Manchester City, helping the club emerge as one of the dominant forces in English football. He was part of the team that won the FA Cup in 2011, ending the club's 35-year trophy drought.
Vincent Kompany has said he will not be swayed from his plans to rebuild Anderlecht and will stick with a policy of fielding young players despite losing at home in his first match in charge of Belgium's most successful club.
Vincent Kompany called time on his 11-year stay at Manchester City to become player-manager at Anderlecht - the club where he started his career almost two decades ago.
Vincent Kompany scored with a thunderous long-range strike to decide their penultimate league match of the season against Leicester City, a key moment in their retaining the Premier League title.
After City's 4-1 win at Brighton & Hove Albion sealed the successful defence of their crown, captain Vincent Kompany and his men already had their eyes on a unique English treble by winning the FA Cup final against Watford next weekend.