Skip to content

Commit d28aa6a

Browse files
authored
Merge pull request #10513 from soyeric128/monitor-sentry
docs: Sentry doc
2 parents e6eba6b + 9ee81cd commit d28aa6a

File tree

4 files changed

+37
-32
lines changed

4 files changed

+37
-32
lines changed

docs/doc/13-monitor/jaeger.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Monitoring with Jaeger
2+
title: Jaeger
33
---
44

55
[Jaeger](https://github.com/jaegertracing/jaeger) is an open-source, end-to-end distributed tracing tool that originated from [Uber](https://www.uber.com/). It helps monitor and troubleshoot microservices-based applications.
@@ -16,9 +16,9 @@ This tutorial uses the All In One image to deploy Jaeger in Docker. If you alrea
1616
docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
1717
```
1818

19-
### Step 2. Deploy Databend
19+
### Step 2. Set Environment Variables
2020

21-
1. Set the following environment variables according to your actual tracing level requirements and Jaeger endpoint.
21+
Set the following environment variables according to your actual tracing level requirements and Jaeger endpoint.
2222
- `RUST_LOG`: Sets the log level.
2323
- `DATABEND_JAEGER_AGENT_ENDPOINT`: Sets the endpoint the Jaeger agent is listening on.
2424

@@ -27,17 +27,19 @@ export RUST_LOG=DEBUG
2727
export DATABEND_JAEGER_AGENT_ENDPOINT=localhost:6831
2828
```
2929

30-
2. Follow the [Deployment Guide](https://databend.rs/doc/deploy) to deploy Databend.
30+
### Step 3. Deploy Databend
3131

32-
3. Run the following SQL statements:
32+
1. Follow the [Deployment Guide](https://databend.rs/doc/deploy) to deploy Databend.
33+
34+
2. Run the following SQL statements:
3335

3436
```sql
3537
CREATE TABLE t1(a INT);
3638
INSERT INTO t1 VALUES(1);
3739
INSERT INTO t1 SELECT * FROM t1;
3840
```
3941

40-
### Step 3. Check Tracing Information on Jaegar
42+
### Step 4. Check Tracing Information on Jaegar
4143

4244
1. Go to <http://127.0.0.1:16686/> and select the **Search** tab.
4345

docs/doc/13-monitor/sentry.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,51 @@
11
---
2-
title: Monitoring with Sentry
2+
title: Sentry
33
---
44

5-
With automated error reporting, you can not only get alerted when something breaks, but also access the details you need to reproduce the issue.
5+
[Sentry](https://sentry.io/welcome/) is a developer-first error tracking and performance monitoring platform that helps developers see what actually matters, solve quicker, and learn continuously about their applications.
66

7-
## Sentry
7+
Databend provides integration with both Cloud and self-hosted Sentry solutions. The following tutorial walks you through the integration process.
88

9-
Databend provides integration with [Sentry](https://github.com/getsentry/sentry), a developer-first error tracking and performance monitoring platform.
9+
## Tutorial: Monitor Databend with Sentry
1010

11-
### Deploy Sentry
11+
### Step 1. Deploy Sentry
1212

13-
You can use Sentry as a cloud service by signing up at [sentry.io](https://sentry.io), or you can host it yourself by following the instructions at [Self-Hosted Sentry](https://develop.sentry.dev/self-hosted/).
13+
To deploy an on-premises Sentry, follow the instructions: https://develop.sentry.dev/self-hosted/
1414

15-
<img src="/img/tracing/sentry-hosted.png"/>
15+
This tutorial uses the Sentry service on the cloud. To sign up an account for Cloud Sentry, go to https://sentry.io
1616

17-
### Create a Project
17+
### Step 2. Create a Sentry Project
1818

19-
To use Sentry with Databend, you need to create a project in Sentry and get its DSN (Data Source Name). The DSN is a unique identifier for your project that tells Sentry where to send your data. In this example, the DSN is `http://[email protected]:9000/5`
19+
Once you're logged into Sentry, create a Sentry project for the `Rust` platform to start. For how to create a project on Sentry, see https://docs.sentry.io/product/sentry-basics/integrate-frontend/create-new-project/
2020

21-
<img src="/img/tracing/sentry-get-dsn.png"/>
21+
![Alt text](../../public/img/tracing/sentry-rust.png)
2222

23-
### Start Databend
23+
### Step 3. Set Environment Variables
2424

25-
You can start Databend with Sentry in two ways:
25+
1. Get the DSN (Data Source Name) of your project. For what DSN is and where to find it, see https://docs.sentry.io/product/sentry-basics/dsn-explainer/
2626

27-
- **Enable Error Tracking Only**
27+
2. Set environment variables.
2828

29-
This option will only use the `sentry-log` feature, which will send error logs to Sentry.
29+
- To enable the error-tracking feature, run the following commands:
3030

31-
```bash
32-
export DATABEND_SENTRY_DSN="<your-sentry-dsn>"
33-
```
31+
```bash
32+
export DATABEND_SENTRY_DSN="<your-DSN>"
33+
```
3434

35-
<img src="/img/tracing/sentry-error.png"/>
35+
- To enable the performance monitoring feature, run the following commands:
3636

37-
- **Also Enable Performance Monitoring**
37+
```bash
38+
export DATABEND_SENTRY_DSN="<your-DSN>"
39+
export SENTRY_TRACES_SAMPLE_RATE=1.0 LOG_LEVEL=DEBUG
40+
```
41+
:::tip
42+
Set `SENTRY_TRACES_SAMPLE_RATE` to a small value in production.
43+
:::
3844

39-
Setting `SENTRY_TRACES_SAMPLE_RATE` greater than `0.0` will allow sentry to perform trace sampling, which will help set up performance monitoring.
45+
### Step 4. Deploy Databend
4046

41-
```bash
42-
export DATABEND_SENTRY_DSN="<your-sentry-dsn>"
43-
export SENTRY_TRACES_SAMPLE_RATE=1.0 LOG_LEVEL=DEBUG
44-
```
47+
Follow the [Deployment Guide](https://databend.rs/doc/deploy) to deploy Databend.
4548

46-
**Note:** Set `SENTRY_TRACES_SAMPLE_RATE` a to lower value in production.
49+
You're all set now. Check the pages on Sentry for alerts and performce information.
4750

48-
<img src="/img/tracing/sentry-performance.png"/>
51+
![Alt text](../../public/img/tracing/sentry-done.png)
857 KB
Loading
132 KB
Loading

0 commit comments

Comments
 (0)