Skip to content

Document lib-name suffix format used by official clients #2537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion commands/client-setinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ Currently the supported attributes are:
* `lib-name` - meant to hold the name of the client library that's in use.
* `lib-ver` - meant to hold the client library's version.

There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-printable characters that would violate the format of the `CLIENT LIST` reply.
There is no limit to the length of these attributes. However, it is not possible to use spaces, newlines, or other non-printable characters that would violate the format of the `CLIENT LIST` reply.

[Official client libraries](https://redis.io/docs/clients/) allow extending `lib-name` with a custom suffix to expose additional information about the client.
For example, high-level libraries like [redis-om-spring](https://github.com/redis/redis-om-spring) can report their version.
The resulting `lib-name` would be `jedis(redis-om-spring_v1.0.0)`.
Brace characters are used to delimit the custom suffix and should be avoided in the suffix itself.
We recommend using the following format for the custom suffixes for third-party libraries `(?<custom-name>[ -~]+)[ -~]v(?<custom-version>[\d\.]+)` and use `;` to delimit multiple suffixes.

Note that these attributes are **not** cleared by the RESET command.

Expand Down