summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/app/_base.py1
-rw-r--r--synapse/config/metrics.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py
index 9ac7e4313e..aed98f03af 100644
--- a/synapse/app/_base.py
+++ b/synapse/app/_base.py
@@ -665,6 +665,7 @@ def setup_sentry(hs: "HomeServer") -> None:
     sentry_sdk.init(
         dsn=hs.config.metrics.sentry_dsn,
         release=SYNAPSE_VERSION,
+        environment=hs.config.metrics.sentry_environment,
     )
 
     # We set some default tags that give some context to this instance
diff --git a/synapse/config/metrics.py b/synapse/config/metrics.py
index 8c1c9bd12d..cb2a61a1c7 100644
--- a/synapse/config/metrics.py
+++ b/synapse/config/metrics.py
@@ -61,6 +61,7 @@ class MetricsConfig(Config):
             check_requirements("sentry")
 
             self.sentry_dsn = config["sentry"].get("dsn")
+            self.sentry_environment = config["sentry"].get("environment")
             if not self.sentry_dsn:
                 raise ConfigError(
                     "sentry.dsn field is required when sentry integration is enabled"