Sentry:修订间差异
跳到导航
跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(→設定) |
(→安裝) |
||
(未显示同一用户的13个中间版本) | |||
第3行: | 第3行: | ||
== 硬體 == | == 硬體 == | ||
官方推估每天處理四百萬的事件,資料保留90天,大約需要1.5 TB的空間<ref>{{Cite web |url=https://docs.sentry.io/server/installation/ |title=Docs - Installation |accessdate=2019-04-22}}</ref>。 | 官方的GitHub頁面上會更新目前最新版本需要的硬體規格。 | ||
官方推估每天處理四百萬的事件,資料保留90天,大約需要1.5 TB的空間<ref>{{Cite web |url=https://docs.sentry.io/server/installation/ |title=Docs - Installation |accessdate=2019-04-22}}</ref> 。目前測過的版本(23.9.1)在跑一陣子後大約需要9GB的記憶體空間 。 | |||
== 簡介 == | == 簡介 == | ||
第25行: | 第27行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo su - service-sentry -c "git clone https://github.com/getsentry/self-hosted.git; cd self-hosted; git checkout 23.4. | sudo su - service-sentry -c "git clone https://github.com/getsentry/self-hosted.git; cd self-hosted; git checkout 24.4.1; ./install.sh; docker compose up -d" | ||
</syntaxhighlight> | |||
裝完後會在Port 9000執行提供服務,可以透過[[nginx]]轉發對應的連線需求。 | |||
== 升級 == | |||
請務必先參考[https://develop.sentry.dev/self-hosted/releases/ Self-Hosted Releases & Upgrading]文件上的說明,有些版本是需要先升級到某個中間版本才能往後繼續升級,像是目前看到的說明: | |||
<pre> | |||
<your.sentry.version> -> 9.1.2 -> 21.5.0 -> 21.6.3 -> 23.6.2 -> latest | |||
</pre> | |||
升級的方式是切到<code>self-hosted</code>目錄下跑<code>./install.sh</code>: | |||
<syntaxhighlight lang="bash"> | |||
cd self-hosted; docker compose down; git pull; git checkout 24.4.1; ./install.sh; docker compose up -d | |||
</syntaxhighlight> | </syntaxhighlight> | ||
第36行: | 第54行: | ||
* 需要先到Google端建立應用程式。 | * 需要先到Google端建立應用程式。 | ||
** 其中文章裡沒有提到的是Google端的<code>redirect_uri</code>設定需要設為<code>https://sentry.example.com/auth/sso/</code>。 | ** 其中文章裡沒有提到的是Google端的<code>redirect_uri</code>設定需要設為<code>https://sentry.example.com/auth/sso/</code>。 | ||
* 再把應用程式對應的client id與client secret填到<code>sentry/config.yml</code>內,再重啟Sentry。 | |||
=== Slack === | === Slack === |
2024年4月23日 (二) 16:41的最新版本
Sentry是一套搜集错误讯息的软件,或是对应的云端服务。
硬件
官方的GitHub页面上会更新目前最新版本需要的硬件规格。
官方推估每天处理四百万的事件,资料保留90天,大约需要1.5 TB的空间[1]。目前测过的版本(23.9.1)在跑一阵子后大约需要9GB的内存空间。
简介
Sentry提供SDK在用户端安装后就可以搜集错误资讯,并且在服务器上分类并提供界面让维护者可以确认情况。
安装
这边以Ubuntu 22.04为操作系统,需要先安装Docker与Docker Compose(要注意得安装Ubuntu套件库提供的版本),并且设定权限:
sudo apt install docker-compose
sudo groupadd -g 9000 service-sentry
sudo useradd -g 9000 -G docker -m -s /bin/bash -u 9000 service-sentry
然后装到service-sentry
下:
sudo su - service-sentry -c "git clone https://github.com/getsentry/self-hosted.git; cd self-hosted; git checkout 24.4.1; ./install.sh; docker compose up -d"
装完后会在Port 9000执行提供服务,可以透过nginx转发对应的连线需求。
升级
请务必先参考Self-Hosted Releases & Upgrading文件上的说明,有些版本是需要先升级到某个中间版本才能往后继续升级,像是目前看到的说明:
<your.sentry.version> -> 9.1.2 -> 21.5.0 -> 21.6.3 -> 23.6.2 -> latest
升级的方式是切到self-hosted
目录下跑./install.sh
:
cd self-hosted; docker compose down; git pull; git checkout 24.4.1; ./install.sh; docker compose up -d
设定
Google OAuth
参考Self-Hosted Single Sign-On (SSO)这边的设定:
- 需要先到Google端建立应用程序。
- 其中文章里没有提到的是Google端的
redirect_uri
设定需要设为https://sentry.example.com/auth/sso/
。
- 其中文章里没有提到的是Google端的
- 再把应用程序对应的client id与client secret填到
sentry/config.yml
内,再重启Sentry。
Slack
参考Slack Integration这边的设定。
除错
可以先用docker-compose
的logs -f
看错误讯息:
docker-compose logs -f
参考文献
- ↑ Docs - Installation. [2019-04-22].
外部链接
- 官方网站 (英文)
- Sentry On-Premise setup (英文)
- Docs - Sentry Server (英文)