mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
production: Add optional support for submitting usage statistics.
See documentation for details.
This commit is contained in:
@@ -11,6 +11,7 @@ from django.utils.timezone import utc as timezone_utc
|
||||
|
||||
from analytics.lib.counts import COUNT_STATS, logger, process_count_stat
|
||||
from scripts.lib.zulip_tools import ENDC, WARNING
|
||||
from zerver.lib.remote_server import send_analytics_to_remote_server
|
||||
from zerver.lib.timestamp import floor_to_hour
|
||||
from zerver.models import Realm
|
||||
|
||||
@@ -84,3 +85,6 @@ class Command(BaseCommand):
|
||||
print("Finished updating analytics counts through %s in %.3fs" %
|
||||
(fill_to_time, time.time() - start))
|
||||
logger.info("Finished updating analytics counts through %s" % (fill_to_time,))
|
||||
|
||||
if settings.PUSH_NOTIFICATION_BOUNCER_URL and settings.SUBMIT_USAGE_STATISTICS:
|
||||
send_analytics_to_remote_server()
|
||||
|
@@ -130,6 +130,21 @@ and privacy in mind:
|
||||
If you have any questions about the security model, contact
|
||||
support@zulipchat.com.
|
||||
|
||||
## Submitting statistics
|
||||
|
||||
Systems using the Mobile Push Notifications Service will, by default,
|
||||
submit basic usage statistics (e.g. Zulip version, number of users,
|
||||
number of messages sent) to the service. These statistics help the
|
||||
Zulip open source project understand how many people are using Zulip,
|
||||
and help us allocate resources towards supporting self-hosted
|
||||
installations.
|
||||
|
||||
Our use of these statistics is governed by the same ToS and
|
||||
Privacy Policy that covers the Mobile Push Notifications Service
|
||||
itself. If your organization does not want to submit these
|
||||
statistics, you can disable this feature at any time by setting
|
||||
`SUBMIT_USAGE_STATISTICS=False` in `/etc/zulip/settings.py`.
|
||||
|
||||
## Legacy signup
|
||||
|
||||
Here are legacy instructions for signing a server up for push
|
||||
|
@@ -131,6 +131,7 @@ def send_analytics_to_remote_server() -> None:
|
||||
request = {
|
||||
'realm_counts': ujson.dumps(realm_count_data),
|
||||
'installation_counts': ujson.dumps(installation_count_data),
|
||||
'version': ujson.dumps(ZULIP_VERSION),
|
||||
}
|
||||
|
||||
# Gather only entries with an ID greater than last_realm_count_id
|
||||
|
@@ -223,6 +223,13 @@ SSO_APPEND_DOMAIN = None # type: Optional[str]
|
||||
# notification encryption feature.
|
||||
#PUSH_NOTIFICATION_REDACT_CONTENT = False
|
||||
|
||||
# Whether to submit basic usage statistics to help the Zulip core team. Details at
|
||||
#
|
||||
# https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html
|
||||
#
|
||||
# Defaults to True if and only if the Mobile Push Notifications Service is enabled.
|
||||
#SUBMIT_USAGE_STATISTICS = True
|
||||
|
||||
# Controls whether session cookies expire when the browser closes
|
||||
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
|
||||
|
||||
|
@@ -226,6 +226,7 @@ DEFAULT_SETTINGS = {
|
||||
'PASSWORD_MIN_GUESSES': 10000,
|
||||
'PUSH_NOTIFICATION_BOUNCER_URL': None,
|
||||
'PUSH_NOTIFICATION_REDACT_CONTENT': False,
|
||||
'SUBMIT_USAGE_STATISTICS': True,
|
||||
'RATE_LIMITING': True,
|
||||
'SEND_LOGIN_EMAILS': True,
|
||||
'EMBEDDED_BOTS_ENABLED': False,
|
||||
|
Reference in New Issue
Block a user