mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 07:24:49 -04:00
add report_stats_endpoint config option (#6012)
This PR adds the optional `report_stats_endpoint` to configure where stats are reported to, if enabled.
This commit is contained in:
parent
a8251da10f
commit
dd2e5b0038
4 changed files with 19 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue