Skip to content

Commit

Permalink
Change default stats reporting endpoint (matrix-org#3007)
Browse files Browse the repository at this point in the history
It's the same instance we report to, only using the subdomain.
  • Loading branch information
S7evinK committed Mar 10, 2023
1 parent c7303cb commit 689b5ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dendrite-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ global:
# We use this information to understand how Dendrite is being used in the wild.
report_stats:
enabled: false
endpoint: https://matrix.org/report-usage-stats/push
endpoint: https://panopticon.matrix.org/push

# Server notices allows server admins to send messages to all users on the server.
server_notices:
Expand Down
7 changes: 6 additions & 1 deletion setup/config/config_global.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,15 @@ type ReportStats struct {

func (c *ReportStats) Defaults() {
c.Enabled = false
c.Endpoint = "https://matrix.org/report-usage-stats/push"
c.Endpoint = "https://panopticon.matrix.org/push"
}

func (c *ReportStats) Verify(configErrs *ConfigErrors) {
// We prefer to hit panopticon (https://github.com/matrix-org/panopticon) directly over
// the "old" matrix.org endpoint.
if c.Endpoint == "https://matrix.org/report-usage-stats/push" {
c.Endpoint = "https://panopticon.matrix.org/push"
}
if c.Enabled {
checkNotEmpty(configErrs, "global.report_stats.endpoint", c.Endpoint)
}
Expand Down

0 comments on commit 689b5ee

Please sign in to comment.