Skip to content

Commit 93cc445

Browse files
mimre25antonpirkershanamatthews
authored
Add documentation for python clickhouse-driver integration (#7129)
--------- Co-authored-by: Anton Pirker <[email protected]> Co-authored-by: Shana Matthews <[email protected]>
1 parent db746d1 commit 93cc445

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: clickhouse-driver
3+
description: "Learn about importing the clickhouse-driver integration and how it captures queries from clickhouse-driver as breadcrumbs."
4+
sidebar_order: 27
5+
---
6+
7+
The clickhouse-driver integration captures queries from
8+
[clickhouse-driver](https://github.com/mymarilyn/clickhouse-driver) as breadcrumbs and spans.
9+
The integration is available for clickhouse-driver 0.2.0 or later.
10+
11+
## Install
12+
13+
Install `sentry-sdk` with the `clickhouse-driver` extra.
14+
15+
```bash
16+
pip install --upgrade 'sentry-sdk[clickhouse-driver]'
17+
```
18+
19+
## Configure
20+
21+
Add `ClickhouseDriverIntegration()` to your `integrations` list:
22+
23+
```python
24+
import sentry_sdk
25+
from sentry_sdk.integrations.clickhouse_driver import ClickhouseDriverIntegration
26+
27+
sentry_sdk.init(
28+
dsn="___PUBLIC_DSN___",
29+
integrations=[
30+
ClickhouseDriverIntegration(),
31+
],
32+
)
33+
```
34+
35+
By default, the parameters of the query are not retrieved. To see the query parameters in Sentry, enable `send_default_pii`. See <PlatformLink to="/configuration/options/#send-default-pii">Basic Options</PlatformLink> for details.
36+
37+
## Supported Versions
38+
39+
- clickhouse-driver >= 0.2.0
40+
- python >= 3.8

src/platforms/python/common/configuration/integrations/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ If you don't want integrations to be enabled automatically, set the `default_int
1818

1919
- [ASGI](asgi/)
2020
- [asyncio](asyncio/)
21+
- [clickhouse-driver](clickhouse-driver/)
2122
- [Cloud Resource Context](cloudresourcecontext/)
2223
- [Enhanced Locals](pure_eval/)
2324
- [GNU Backtrace](gnu_backtrace/)

0 commit comments

Comments
 (0)