Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Document Sentry frontend reporting.
Alex Vandiverf9f7c7b1145d
diff --git a/docs/subsystems/logging.md b/docs/subsystems/logging.mdindex 11c8d3a1d82..dce86b91c00 100644--- a/docs/subsystems/logging.md+++ b/docs/subsystems/logging.md@@ -221,6 +221,34 @@ Blueslip supports several error levels:- `blueslip.debug`: Similar to `blueslip.log`, but are not printed tothe JS console in development.+### Sentry JavaScript error logging++Zulip's optional JavaScript [Sentry][sentry] integration will aggregate errors+to show which users and realms are affected, any logging which happened prior to+the exception, and any DOM interactions which happened prior to the error.++You can enable it by:++1. Create a [project][sentry-project] in your Sentry organization+ with a platform of "JavaScript."+2. Copy your [Sentry DSN][sentry-dsn] into `/etc/zulip/settings.py`+ as `SENTRY_FRONTEND_DSN`:+ ```python3+ ## Controls the DSN used to report JavaScript errors to Sentry.io+ SENTRY_FRONTEND_DSN = "https://[email protected]/1234"+ ```+3. If you wish to [sample][sentry-sample] some fraction of the errors, you+ should adjust `SENTRY_FRONTEND_SAMPLE_RATE` down from `1.0`.+4. As the `zulip` user, restart Zulip by running:+ ```shell+ /home/zulip/deployments/current/scripts/restart-server+ ```++You may also want to enable Zulip's [Sentry deploy+hook][sentry-deploy-hook].++[sentry-sample]: https://docs.sentry.io/platforms/javascript/configuration/sampling/+## Frontend performance reportingIn order to make it easier to debug potential performance problems in