CLIENT SETINFO command sets client library name and version information that will be shown in CLIENT LIST and CLIENT INFO commands. This helps identify which client library is being used and is useful for debugging and monitoring.
Arguments
The attribute to set:
LIB-NAMEorlib-name: Library nameLIB-VERorlib-ver: Library version
The value to set for the attribute.
Response
Returns
OK if the attribute was successfully set.Use Cases
- Debugging: Identify which client library version is being used
- Monitoring: Track different client libraries connecting to Redis
- Analytics: Understand client library distribution across connections
- Support: Quickly identify client versions when troubleshooting issues
Viewing Client Information
After setting client info, you can view it using the CLIENT LIST command:Best Practices
- Set on Connection: Set client info immediately after establishing a connection
- Include Version: Always set both library name and version
- Use Descriptive Names: Make library names easily identifiable
- Version Format: Use semantic versioning (e.g., “1.2.3”)
- Include Context: Add wrapper or framework info if applicable
This command is available in Redis 7.2.0 and later. The attribute names are case-insensitive and will be normalized to uppercase.