Sentry:修订间差异
跳到导航
跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(→安裝) |
(→硬體) |
||
(未显示同一用户的16个中间版本) | |||
第4行: | 第4行: | ||
官方推估每天處理四百萬的事件,資料保留90天,大約需要1.5 TB的空間<ref>{{Cite web |url=https://docs.sentry.io/server/installation/ |title=Docs - Installation |accessdate=2019-04-22}}</ref>。 | 官方推估每天處理四百萬的事件,資料保留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的記憶體空間。 | |||
== 簡介 == | == 簡介 == | ||
第11行: | 第13行: | ||
== 安裝 == | == 安裝 == | ||
這邊以[[Ubuntu]] 22.04為作業系統,需要先安裝[[Docker]]與Docker Compose(要注意 | 這邊以[[Ubuntu]] 22.04為作業系統,需要先安裝[[Docker]]與Docker Compose(要注意 得 安裝Ubuntu套件庫提供的版本),並且設定權限: | ||
<syntaxhighlight lang="bash"> | |||
sudo apt install docker-compose | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo groupadd -g 9000 service-sentry | sudo groupadd -g 9000 service-sentry | ||
sudo useradd -g 9000 -G docker - | sudo useradd -g 9000 -G docker -m -s /bin/bash -u 9000 service-sentry | ||
</syntaxhighlight> | </syntaxhighlight> | ||
第21行: | 第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 21. | sudo su - service-sentry -c "git clone https://github.com/getsentry/self-hosted.git; cd self-hosted; git checkout 23.7.2; ./install.sh; docker compose up -d" | ||
</syntaxhighlight> | |||
== 升級 == | |||
請務必先參考[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 23.7.2; ./install.sh; docker compose up -d | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== 設定 == | == 設定 == | ||
=== Google OAuth === | |||
參考[https://develop.sentry.dev/self-hosted/sso/ Self-Hosted Single Sign-On (SSO)]這邊的設定: | |||
* 需要先到Google端建立應用程式。 | |||
** 其中文章裡沒有提到的是Google端的<code>redirect_uri</code>設定需要設為<code>https://sentry.example.com/auth/sso/</code>。 | |||
* 再把應用程式對應的client id與client secret填到<code>sentry/config.yml</code>內,再重啟Sentry。 | |||
=== Slack === | |||
參考[https://develop.sentry.dev/integrations/slack/ Slack Integration]這邊的設定。 | |||
== 除錯 == | == 除錯 == |
2023年10月15日 (日) 20:39的版本
Sentry是一套搜集错误讯息的软体,或是对应的云端服务。
硬体
官方推估每天处理四百万的事件,资料保留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 23.7.2; ./install.sh; docker compose up -d"
升级
请务必先参考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 23.7.2; ./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 (英文)