Skip to content

Commit 0430ec6

Browse files
.
1 parent 53a624a commit 0430ec6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sentry_sdk/integrations/clickhouse_driver.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from sentry_sdk.traces import StreamedSpan
99
from sentry_sdk.tracing import Span
1010
from sentry_sdk.tracing_utils import has_span_streaming_enabled
11-
from sentry_sdk.utils import has_data_collection_enabled
11+
from sentry_sdk.utils import capture_internal_exceptions, has_data_collection_enabled
1212

1313
# Hack to get new Python features working in older versions
1414
# without introducing a hard dependency on `typing_extensions`
@@ -180,6 +180,11 @@ def _inner_end(*args: "P.args", **kwargs: "P.kwargs") -> "T":
180180
elif should_send_default_pii():
181181
span.set_data("db.result", res)
182182

183+
with capture_internal_exceptions():
184+
span.scope.add_breadcrumb(
185+
message=span._data.pop("query"), category="query", data=span._data
186+
)
187+
183188
span.finish()
184189

185190
return res

0 commit comments

Comments
 (0)