Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
b25e387c
Unverified
Commit
b25e387c
authored
5 years ago
by
Neil Johnson
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add context to phonehome stats (#5020)
add context to phonehome stats
parent
67d7b447
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
changelog.d/5020.feature
+1
-0
1 addition, 0 deletions
changelog.d/5020.feature
docs/sample_config.yaml
+3
-0
3 additions, 0 deletions
docs/sample_config.yaml
synapse/app/homeserver.py
+1
-1
1 addition, 1 deletion
synapse/app/homeserver.py
synapse/config/server.py
+4
-0
4 additions, 0 deletions
synapse/config/server.py
with
9 additions
and
1 deletion
changelog.d/5020.feature
0 → 100644
+
1
−
0
View file @
b25e387c
Add
context
to
phonehome
stats.
This diff is collapsed.
Click to expand it.
docs/sample_config.yaml
+
3
−
0
View file @
b25e387c
...
@@ -236,6 +236,9 @@ listeners:
...
@@ -236,6 +236,9 @@ listeners:
# - medium: 'email'
# - medium: 'email'
# address: 'reserved_user@example.com'
# address: 'reserved_user@example.com'
# Used by phonehome stats to group together related servers.
#server_context: context
## TLS ##
## TLS ##
...
...
This diff is collapsed.
Click to expand it.
synapse/app/homeserver.py
+
1
−
1
View file @
b25e387c
...
@@ -518,6 +518,7 @@ def run(hs):
...
@@ -518,6 +518,7 @@ def run(hs):
uptime
=
0
uptime
=
0
stats
[
"
homeserver
"
]
=
hs
.
config
.
server_name
stats
[
"
homeserver
"
]
=
hs
.
config
.
server_name
stats
[
"
server_context
"
]
=
hs
.
config
.
server_context
stats
[
"
timestamp
"
]
=
now
stats
[
"
timestamp
"
]
=
now
stats
[
"
uptime_seconds
"
]
=
uptime
stats
[
"
uptime_seconds
"
]
=
uptime
version
=
sys
.
version_info
version
=
sys
.
version_info
...
@@ -558,7 +559,6 @@ def run(hs):
...
@@ -558,7 +559,6 @@ def run(hs):
stats
[
"
database_engine
"
]
=
hs
.
get_datastore
().
database_engine_name
stats
[
"
database_engine
"
]
=
hs
.
get_datastore
().
database_engine_name
stats
[
"
database_server_version
"
]
=
hs
.
get_datastore
().
get_server_version
()
stats
[
"
database_server_version
"
]
=
hs
.
get_datastore
().
get_server_version
()
logger
.
info
(
"
Reporting stats to matrix.org: %s
"
%
(
stats
,))
logger
.
info
(
"
Reporting stats to matrix.org: %s
"
%
(
stats
,))
try
:
try
:
yield
hs
.
get_simple_http_client
().
put_json
(
yield
hs
.
get_simple_http_client
().
put_json
(
...
...
This diff is collapsed.
Click to expand it.
synapse/config/server.py
+
4
−
0
View file @
b25e387c
...
@@ -37,6 +37,7 @@ class ServerConfig(Config):
...
@@ -37,6 +37,7 @@ class ServerConfig(Config):
def
read_config
(
self
,
config
):
def
read_config
(
self
,
config
):
self
.
server_name
=
config
[
"
server_name
"
]
self
.
server_name
=
config
[
"
server_name
"
]
self
.
server_context
=
config
.
get
(
"
server_context
"
,
None
)
try
:
try
:
parse_and_validate_server_name
(
self
.
server_name
)
parse_and_validate_server_name
(
self
.
server_name
)
...
@@ -484,6 +485,9 @@ class ServerConfig(Config):
...
@@ -484,6 +485,9 @@ class ServerConfig(Config):
#mau_limit_reserved_threepids:
#mau_limit_reserved_threepids:
# - medium:
'
email
'
# - medium:
'
email
'
# address:
'
reserved_user@example.com
'
# address:
'
reserved_user@example.com
'
# Used by phonehome stats to group together related servers.
#server_context: context
"""
%
locals
()
"""
%
locals
()
def
read_arguments
(
self
,
args
):
def
read_arguments
(
self
,
args
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment