If somebody is representing company, as that agent did, hi must be possible for customer to identify him. And there is 2 options: by his name (what must not be the actual name, can be name for customers, but then company need to know, who it was actually) or number/code. If the name is written and visible, absolutely everybody have right to write it down.
I had about year ago similar situation with one purser who just did not her work as needed.
Before disembarking aircraft I told to her what I am thinking of her job-quality level and wrote down her name.
She also tried to tell me that I have no right to write down her name.
Well...
I approached after that to situation very officially and 3 days later got 50k miles on my account + apology phone-call and later apology-letter with confirmation, that this purser is not working as purser any more.
Actually I find it very disciplining for any agent/purser/who-ever to write down their name when they see it.
If you point here that you see that you was discriminated it will make all the process much faster.
And such an unpolite agentswill soon not work on current position.
You should also write official complain to LH.