From 79f4bcf5beccd040784078d223b9931406297522 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Fri, 7 Jun 2019 16:02:41 -0500 Subject: [PATCH] Enable sentry.io integration --- roles/matrix-synapse/defaults/main.yml | 6 ++++++ roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/matrix-synapse/defaults/main.yml b/roles/matrix-synapse/defaults/main.yml index f343d5ff..e69f8114 100644 --- a/roles/matrix-synapse/defaults/main.yml +++ b/roles/matrix-synapse/defaults/main.yml @@ -205,6 +205,12 @@ matrix_synapse_url_preview_enabled: true matrix_synapse_metrics_enabled: false matrix_synapse_metrics_port: 9100 +# Send ERROR logs to sentry.io for easier tracking +# To set this up: go to sentry.io, create a python project, and set +# matrix_synapse_sentry_dsn to the URL it gives you. +# See https://github.com/matrix-org/synapse/issues/4632 for important privacy concerns +matrix_synapse_sentry_dsn: "" + # Postgres database information matrix_synapse_database_host: "" matrix_synapse_database_user: "" diff --git a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 index 9e7777fd..8b9cf4f3 100644 --- a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -872,8 +872,10 @@ enable_metrics: {{ matrix_synapse_metrics_enabled|to_json }} # information, and it in turn may then diseminate sensitive information # through insecure notification channels if so configured. # -#sentry: -# dsn: "..." +{% if matrix_synapse_sentry_dsn != "" %} +sentry: + dsn: {{ matrix_synapse_sentry_dsn|to_json }} +{% endif %} # Whether or not to report anonymized homeserver usage statistics. report_stats: {{ matrix_synapse_report_stats|to_json }}