0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 00:13:51 +01:00

Merge pull request #6510 from matrix-org/erikj/phone_home_stats_db

Phone home stats DB reporting should not assume a single DB.
This commit is contained in:
Erik Johnston 2019-12-10 16:31:24 +00:00 committed by GitHub
commit b2dcddc413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

1
changelog.d/6510.misc Normal file
View file

@ -0,0 +1 @@
Change phone home stats to not assume there is a single database and report information about the database used by the main data store.

View file

@ -519,8 +519,10 @@ def phone_stats_home(hs, stats, stats_process=_stats_process):
# Database version
#
stats["database_engine"] = hs.database_engine.module.__name__
stats["database_server_version"] = hs.database_engine.server_version
# This only reports info about the *main* database.
stats["database_engine"] = hs.get_datastore().db.engine.module.__name__
stats["database_server_version"] = hs.get_datastore().db.engine.server_version
logger.info("Reporting stats to %s: %s" % (hs.config.report_stats_endpoint, stats))
try:
yield hs.get_proxied_http_client().put_json(