diff options
author | Sorunome <mail@sorunome.de> | 2019-09-12 12:24:57 +0200 |
---|---|---|
committer | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-09-12 11:24:57 +0100 |
commit | dd2e5b0038dbe9812775e5943e5bccf550d7468a (patch) | |
tree | ad1434e1da092612d4625caf99adc17ff59d5d36 /synapse/config/metrics.py | |
parent | Blow up config if opentracing is missing (#5985) (diff) | |
download | synapse-dd2e5b0038dbe9812775e5943e5bccf550d7468a.tar.xz |
add report_stats_endpoint config option (#6012)
This PR adds the optional `report_stats_endpoint` to configure where stats are reported to, if enabled.
Diffstat (limited to 'synapse/config/metrics.py')
-rw-r--r-- | synapse/config/metrics.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/config/metrics.py b/synapse/config/metrics.py index 9eb1e55ddb..ec35a6b868 100644 --- a/synapse/config/metrics.py +++ b/synapse/config/metrics.py @@ -37,6 +37,9 @@ class MetricsConfig(Config): def read_config(self, config, **kwargs): self.enable_metrics = config.get("enable_metrics", False) self.report_stats = config.get("report_stats", None) + self.report_stats_endpoint = config.get( + "report_stats_endpoint", "https://matrix.org/report-usage-stats/push" + ) self.metrics_port = config.get("metrics_port") self.metrics_bind_host = config.get("metrics_bind_host", "127.0.0.1") @@ -95,4 +98,10 @@ class MetricsConfig(Config): else: res += "report_stats: %s\n" % ("true" if report_stats else "false") + res += """ + # The endpoint to report the anonymized homeserver usage statistics to. + # Defaults to https://matrix.org/report-usage-stats/push + # + #report_stats_endpoint: https://example.com/report-usage-stats/push + """ return res |