Skip to content

Conversation

@viktoriya-kutsarova
Copy link
Contributor

@viktoriya-kutsarova viktoriya-kutsarova commented Nov 25, 2025

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


  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • 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).

Expose methods for identifying upstream libraries using spring-data-redis.

Signed-off-by: viktoriya.kutsarova <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 25, 2025
Comment on lines +65 to +67
private RedisClientLibraryInfo() {
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting seems off here

factory = new JedisConnectionFactory(
new RedisStandaloneConfiguration(SettingsUtils.getHost(), SettingsUtils.getPort()),
JedisClientConfiguration.builder().clientName("clientName").build());
factory.addUpstreamLibNameSuffix(upstreamLibNameSuffix);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we should hide the specifics of building up the suffix from the upstream libraries. Actually I am not sure SDR should do it either, but rather the drivers themselves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants