[Feature][Storage] Tag Valkey connections with a library name (client_info_tag) for server-side attribution
Search before asking
- I searched the issues and found no similar feature request. (Related: #3087 / #3090 added
CLIENT SETNAME— a different field.)
Description
DB-GPT's Valkey storage (dbgpt-ext, extra storage_valkey) builds its connections with valkey-glide, and #3090 already gave the vector-store client a client_name. That value goes through CLIENT SETNAME, though, which managed services such as Amazon ElastiCache don't record in their logs. What they do record is the library name sent via CLIENT SETINFO LIB-NAME. Today every DB-GPT connection reports plain GlidePy, indistinguishable from any other Python app on valkey-glide.
valkey-glide 2.5.2 added a client_info_tag option that appends a tag to that library name. I'd like to set it to db-gpt, so the server sees lib-name=GlidePy(db-gpt).
Proposed change (metadata only):
packages/dbgpt-ext/src/dbgpt_ext/storage/cache/valkey_cache.py—_get_client_config(): addclient_info_tag="db-gpt"to theGlideClientConfigurationkwargs.packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/valkey_store.py—_create_client(): add the same kwarg to bothGlideClientConfiguration(...)branches (with and without credentials). The existingclient_namestays as is.packages/dbgpt-ext/pyproject.toml— raisestorage_valkeyfromvalkey-glide>=2.3.0tovalkey-glide>=2.5.2, since the parameter doesn't exist earlier; update the twopip install 'valkey-glide>=2.3.0'hint strings to match, and regenerateuv.lock(currently resolves 2.4.1).
Use case
Operators running DB-GPT on Valkey / ElastiCache can attribute connections and load to DB-GPT from CLIENT LIST / CLIENT INFO or service logs, without guessing from client names that the logs never capture.
Risk
No behavioural change: client_info_tag only alters the handshake metadata. The only user-visible effect is the higher dependency floor for the optional storage_valkey extra.
Verification
I'll check it on a live Valkey server (standalone) with CLIENT LIST LIB-NAME 'GlidePy(db-gpt)' for both the cache and vector-store clients, and include the observed output in the PR.
Related issues
#3050, #3051, #3057, #3087, #3090
Are you willing to submit PR?
- Yes I am willing to submit a PR! I'll open one in a few days unless you'd prefer a different approach. Is the
>=2.5.2floor bump OK for you?
Source: eosphoros-ai/DB-GPT