spring-data-redis
spring-data-redis copied to clipboard
Identify spring-data-redis using underlying drivers (jedis or lettuce)
This change introduces the ability to identify spring-data-redis clients on the server side using the underlying drivers (jedis and lettuce) and the CLIENT SETINFO command.
As part of the change, the following capabilities are made available:
- Driver-level identification – allows spring-data-redis to register identifying information on the Redis server using the CLIENT SETINFO command, providing insight into which client library is being used.
- Upstream library identification – exposes APIs for upstream libraries (such as spring-session-data-redis) to declare their own identifiers when interacting through spring-data-redis.
- Unified support across drivers - ensures consistent behaviour and metadata propagation between both Jedis and Lettuce client implementations.
- Improved observability - enables server-side visibility into client types and upstream usage patterns for better diagnostics and monitoring.
This feature establishes the foundation for future integrations that require identification of client libraries using spring-data-redis.
The changes are available as part of the following classes:
- RedisClientLibraryInfo
- JedisConnectionFactory / LettuceConnectionFactory
This feature is available starting from Redis OSS version 7.2.x and later
- [x] You have read the Spring Data contribution guidelines.
- [x] You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
- [x] You submit test cases (unit or integration tests) that back your changes.
- [x] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).