Skip to content

Commit

Permalink
Support clickhouse-driver==0.2.7 (#2752)
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana authored Feb 21, 2024
1 parent e24508f commit e07c0ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sentry_sdk/integrations/clickhouse_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def setup_once() -> None:
clickhouse_driver.client.Client.receive_end_of_query = _wrap_end(
clickhouse_driver.client.Client.receive_end_of_query
)
if hasattr(clickhouse_driver.client.Client, "receive_end_of_insert_query"):
# In 0.2.7, insert queries are handled separately via `receive_end_of_insert_query`
clickhouse_driver.client.Client.receive_end_of_insert_query = _wrap_end(
clickhouse_driver.client.Client.receive_end_of_insert_query
)
clickhouse_driver.client.Client.receive_result = _wrap_end(
clickhouse_driver.client.Client.receive_result
)
Expand Down

0 comments on commit e07c0ac

Please sign in to comment.