errors: Use hostname to report deployment.

This commit is contained in:
Tim Abbott 2017-01-28 12:04:35 -08:00
parent f6f8168f4d
commit e69c4458c6
3 changed files with 3 additions and 1 deletions

View File

@ -51,6 +51,7 @@ class AdminZulipHandler(logging.Handler):
report = dict(
node = platform.node(),
host = request.get_host().split(':')[0],
method = request.method,
path = request.path,
data = data,

View File

@ -96,6 +96,7 @@ def json_report_error(request, user_profile, message=REQ(), stacktrace=REQ(),
queue_json_publish('error_reports', dict(
type = "browser",
report = dict(
host = request.get_host().split(":")[0],
user_email = user_profile.email,
user_full_name = user_profile.full_name,
user_visible = ui_message,

View File

@ -277,7 +277,7 @@ class ErrorReporter(QueueProcessingWorker):
if settings.DEPLOYMENT_ROLE_KEY:
self.staging_client.forward_error(event['type'], event['report'])
elif settings.ERROR_REPORTING:
do_report_error(settings.DEPLOYMENT_ROLE_NAME, event['type'], event['report'])
do_report_error(event['report']['host'], event['type'], event['report'])
@assign_queue('slow_queries')
class SlowQueryWorker(QueueProcessingWorker):