centos7歩哨展開ガイド



Centos7 Sentry Deployment Guide



  • ステップ1、pom.xmlにio.sentryを導入します
io.sentry sentry-logback
  • ステップ2:src / resources / logback-spring.xmlでアペンダーを構成し、対応するアペンダー参照参照を追加します。
WARN
  • セントリーWebプラットフォームで作成されたプロジェクトから生成された/etc/supervisor/conf.d/の各構成ファイルに環境変数SENTRY_DSNを追加します。
vi /etc/supervisor/conf.d/ielong-portal.conf [program:ielong-portal] directory = /opt/ibuild The startup directory of the program command = java -jar ielong-portal-1.0-SNAPSHOT.jar --spring.profiles.active=qc Start command, it can be seen that it is the same as the command started manually on the command line environment=SENTRY_DSN='http://eb5c47da4a5942188c62da86ffc19cab:root@xxxxx:9000/2' autostart = true it also starts automatically when supervisord starts startsecs = 30 No abnormal exit after 5 seconds of startup, it is considered to have started normally autorestart = true automatically restart after the program exits abnormally startretries = 3 The number of automatic retries for failed startup, the default is 3 user = root which user to start with redirect_stderr = true redirect stderr to stdout, default false stdout_logfile_maxbytes = 20MB stdout log file size, default 50MB stdout_logfile_backups = 20 number of stdout log file backups stdout log file, you need to note that when the specified directory does not exist, it cannot start normally, so you need to manually create the directory (supervisord will automatically create a log file) stdout_logfile = /var/log/ielong-portal.log