mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
Only log valid stats to statsd
(imported from commit 449b7f5e750913c04e4df8f2a895274ded99ddd9)
This commit is contained in:
parent
a32b47f7d6
commit
591d06cb24
@ -1884,8 +1884,10 @@ def json_report_send_time(request, user_profile,
|
||||
displayed=REQ(converter=to_non_negative_int, default="(unknown)")):
|
||||
logging.info("End-to-end send time: %sms/%sms/%sms (%s)" % (time, received, displayed, user_profile.email))
|
||||
statsd.timing("endtoend.send_time.%s" % (statsd_key(user_profile.realm.domain),), time)
|
||||
statsd.timing("endtoend.receive_time.%s" % (statsd_key(user_profile.realm.domain),), received)
|
||||
statsd.timing("endtoend.displayed_time.%s" % (statsd_key(user_profile.realm.domain),), displayed)
|
||||
if received != "(unknown)":
|
||||
statsd.timing("endtoend.receive_time.%s" % (statsd_key(user_profile.realm.domain),), received)
|
||||
if displayed != "(unknown)":
|
||||
statsd.timing("endtoend.displayed_time.%s" % (statsd_key(user_profile.realm.domain),), displayed)
|
||||
return json_success()
|
||||
|
||||
@authenticated_json_post_view
|
||||
|
||||
Loading…
Reference in New Issue
Block a user