diff --git a/src/confluent_kafka/schema_registry/_async/schema_registry_client.py b/src/confluent_kafka/schema_registry/_async/schema_registry_client.py index 00367dee9..d89932e13 100644 --- a/src/confluent_kafka/schema_registry/_async/schema_registry_client.py +++ b/src/confluent_kafka/schema_registry/_async/schema_registry_client.py @@ -31,6 +31,7 @@ from cachetools import Cache, LRUCache, TTLCache from httpx import Response +from confluent_kafka import version from confluent_kafka.schema_registry.common.schema_registry_client import ( RegisteredSchema, Schema, @@ -479,6 +480,7 @@ async def send_request( 'Content-Length': str(len(body_str)), 'Content-Type': "application/vnd.schemaregistry.v1+json", 'Confluent-Accept-Unknown-Properties': "true", + 'Confluent-Client-Version': f"python/{version()}" } if self.bearer_auth_credentials_source: diff --git a/src/confluent_kafka/schema_registry/_sync/schema_registry_client.py b/src/confluent_kafka/schema_registry/_sync/schema_registry_client.py index 5c357060b..05d001eb9 100644 --- a/src/confluent_kafka/schema_registry/_sync/schema_registry_client.py +++ b/src/confluent_kafka/schema_registry/_sync/schema_registry_client.py @@ -31,6 +31,7 @@ from cachetools import Cache, LRUCache, TTLCache from httpx import Response +from confluent_kafka import version from confluent_kafka.schema_registry.common.schema_registry_client import ( RegisteredSchema, Schema, @@ -477,6 +478,7 @@ def send_request(self, url: str, method: str, body: Optional[dict] = None, query 'Content-Length': str(len(body_str)), 'Content-Type': "application/vnd.schemaregistry.v1+json", 'Confluent-Accept-Unknown-Properties': "true", + 'Confluent-Client-Version': f"python/{version()}", } if self.bearer_auth_credentials_source: