Skip to content
Snippets Groups Projects
Unverified Commit b2dcddc4 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

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

Phone home stats DB reporting should not assume a single DB.
parents 40eda849 accd343f
No related branches found
No related tags found
No related merge requests found
Change phone home stats to not assume there is a single database and report information about the database used by the main data store.
...@@ -519,8 +519,10 @@ def phone_stats_home(hs, stats, stats_process=_stats_process): ...@@ -519,8 +519,10 @@ def phone_stats_home(hs, stats, stats_process=_stats_process):
# Database version # Database version
# #
stats["database_engine"] = hs.database_engine.module.__name__ # This only reports info about the *main* database.
stats["database_server_version"] = hs.database_engine.server_version 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)) logger.info("Reporting stats to %s: %s" % (hs.config.report_stats_endpoint, stats))
try: try:
yield hs.get_proxied_http_client().put_json( yield hs.get_proxied_http_client().put_json(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment