Инструменты пользователя

Инструменты сайта


service:sentry

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слеваПредыдущая версия
Следующая версия
Предыдущая версия
service:sentry [04.10.2023 06:25] viacheslavservice:sentry [30.07.2024 19:21] (текущий) – внешнее изменение 127.0.0.1
Строка 1: Строка 1:
 +====== Sentry ======
  
 +Установка (https://develop.sentry.dev/self-hosted/):
 +<code bash>
 +apt install git -y
 +git clone https://github.com/getsentry/self-hosted.git sentry
 +cd sentry
 +rm geoip/GeoLite2-City.*
 +cp .env .env.custom
 +nano .env.custom
 +</code>
 +
 +<file bash .env.custom>
 +COMPOSE_PROJECT_NAME=sentry
 +SENTRY_EVENT_RETENTION_DAYS=60
 +# You can either use a port number or an IP:PORT combo for SENTRY_BIND
 +# See https://docs.docker.com/compose/compose-file/#ports for more
 +SENTRY_BIND=9000
 +# Set SENTRY_MAIL_HOST to a valid FQDN (host/domain name) to be able to send emails!
 +# In my case I have Exchange with open relay for servers so I keep it commented out, all settings are in sentry/config.yml
 +# SENTRY_MAIL_HOST=mail.example.com
 +SENTRY_IMAGE=getsentry/sentry
 +SNUBA_IMAGE=getsentry/snuba
 +RELAY_IMAGE=getsentry/relay
 +SYMBOLICATOR_IMAGE=getsentry/symbolicator
 +VROOM_IMAGE=getsentry/vroom
 +WAL2JSON_VERSION=latest
 +HEALTHCHECK_INTERVAL=30s
 +HEALTHCHECK_TIMEOUT=1m30s
 +HEALTHCHECK_RETRIES=10
 +# Disable sending information
 +REPORT_SELF_HOSTED_ISSUES=0
 +# Disable communication with a remote beacon server
 +SENTRY_BEACON = False
 +</file>
 +
 +''sudo nano sentry/config.yml''
 +
 +<file yaml sentry/config.yml>
 +###############
 +# Mail Server #
 +###############
 +# mail.backend: 'smtp'  # Use dummy if you want to disable email entirely
 +mail.host: 'mail.example.com'
 +
 +# The email address to send on behalf of
 +# mail.from: 'root@localhost' or ...
 +mail.from: 'Sentry <sentry@example.com>'
 +
 +# The mailing list namespace for emails sent by this Sentry server.
 +# This should be a domain you own (often the same domain as the domain
 +# part of the `mail.from` configuration parameter value) or `localhost`.
 +mail.list-namespace: 'example.com'
 +
 +###################
 +# System Settings #
 +###################
 +
 +# For reverse-proxy (https://develop.sentry.dev/self-hosted/#productionalizing)
 +system.url-prefix: "https://sentry.example.com"
 +</file>
 +
 +''sudo nano sentry/sentry.conf.py''
 +
 +Comment out strings in the Mail section:
 +<file yaml sentry/sentry.conf.py>
 +########
 +# Mail #
 +########
 +#SENTRY_OPTIONS["mail.list-namespace"] = env('SENTRY_MAIL_HOST', 'localhost')
 +#SENTRY_OPTIONS["mail.from"] = f"sentry@{SENTRY_OPTIONS['mail.list-namespace']}"
 +</file>
 +
 +GeoIP database (crontab):
 +<code bash>
 +# Download GeoIP database
 +30 7 * * 1,4 wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb -O ~/sentry/geoip/GeoLite2-City.mmdb
 +</code>
 +
 +Start Sentry:
 +<code bash>
 +sudo ./install.sh
 +docker-compose --env-file .env.custom up -d
 +</code>
 +
 +===== Интеграция с Gitlab =====
 +https://docs.sentry.io/product/integrations/source-code-mgmt/gitlab/
 +
 +После интеграции объекты в Гитлабе из Сентри будут от той учётки, под которой была настроена интеграция, поэтому нужно создать в Гитлабе отдельную учётку Sentry и делать интеграцию под ней, а потом дать ей права на нужные проекты.
 +
 +<color #ed1c24>Error Communicating with GitLab (HTTP 422): unknown error</color> при добавлении репозитория в Sentry.\\
 +GitLab -> Admin area -> Settings -> Network -> Outbound requests -> Allow requests to the local network from webhooks and integrations\\
 +https://github.com/getsentry/sentry/issues/13079
 +https://github.com/getsentry/sentry/issues/13079

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki