vchomakov commented on code in PR #61866:
URL: https://github.com/apache/airflow/pull/61866#discussion_r3130766513


##########
providers/redis/src/airflow/providers/redis/hooks/redis.py:
##########
@@ -87,13 +93,32 @@ def get_conn(self):
                 self.port,
                 self.db,
             )
+
+            # Add driver info for client identification if supported
+            # This allows Redis server to identify Airflow as the upstream 
driver.
+            # See: https://redis.io/docs/latest/commands/client-setinfo/
+            driver_info_options = {}
+            try:
+                # Try to use DriverInfo class if available
+                from redis import DriverInfo
+
+                driver_info = 
DriverInfo().add_upstream_driver("apache-airflow", provider_version)
+                driver_info_options = {"driver_info": driver_info}
+            except ImportError:
+                # Fallback to lib_name parameter if supported
+                if _SUPPORTS_LIB_NAME:
+                    driver_info_options = {
+                        "lib_name": 
f"redis-py(apache-airflow_v{provider_version})",

Review Comment:
   Switched per the previous comment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to