StackExchange / StackExchange.Redis

General purpose redis client
https://stackexchange.github.io/StackExchange.Redis/
Other
5.84k stars 1.5k forks source link

Client name not visible in logs? #2749

Open dominikjeske opened 1 week ago

dominikjeske commented 1 week ago

I have following configuration

Client version: 2.8.0 Server version (KeyDB): 6.2.2

var connectionOptions = new ConfigurationOptions
{
    ClientName = "TEST",
    CommandMap = "SETNAME", "GETNAME"... and others
};

I'm trying to set client name by simply set ClientName in configuration but on server it looks like below

id=54637111 addr=66.66.66.66:62494 laddr=666.666.666.666:666 fd=49 name= age=163 idle=13 flags=N db=11 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=get user=default redir=-1

I set SETNAME in Command map and still it is not set.

Is there anything else needed or maybe it is a bug?

NickCraver commented 1 day ago

We can't really speak to KeyDB's handling of the SETNAME command here - this could be a server-side issue to take up on that end. One thing we can see is your CommandMap has SETNAME and GETNAME but the core command here is CLIENT - is that allowed in your list?

dominikjeske commented 1 day ago

Thanks for suggestion. I don't have CLIENT command in my map so I will check it out. I just wanted to assure I'm doing everything right from client side and I will investigate server side next.