Closed jwhitlock closed 4 weeks ago
When DJANGO_STATSD_ENABLED=True and STATSD_DEBUG=True, log messages like these are emitted:
DJANGO_STATSD_ENABLED=True
STATSD_DEBUG=True
{"Timestamp": 1717537908384410880, "Type": "markus", "Logger": "fx-private-relay", "Hostname": "jwhitlock-MB-M2.lan", "EnvVersion": "2.0", "Severity": 6, "Pid": 66599, "Fields": {"rid": null, "msg": "METRICS|2024-06-04 21:51:48|timing|fx.private.relay.response|55.711984634399414|#status:200,view:<static_file>,method:GET"}} {"Timestamp": 1717537908517943040, "Type": "markus", "Logger": "fx-private-relay", "Hostname": "jwhitlock-MB-M2.lan", "EnvVersion": "2.0", "Severity": 6, "Pid": 66599, "Fields": {"rid": null, "msg": "METRICS|2024-06-04 21:51:48|timing|fx.private.relay.response|82.79109001159668|#status:200,view:<static_file>,method:GET"}}
The second message has details about the response timing metric:
response
METRICS|2024-06-04 21:51:48|timing|fx.private.relay.response|82.79109001159668|#status:200,view:<static_file>,method:GET
This can be useful for local debugging or understanding metrics. It can also be very noisy, and break tests that do not expect them. This PR updates the some tests to filter out the metrics logs.
When
DJANGO_STATSD_ENABLED=True
andSTATSD_DEBUG=True
, log messages like these are emitted:The second message has details about the
response
timing metric:This can be useful for local debugging or understanding metrics. It can also be very noisy, and break tests that do not expect them. This PR updates the some tests to filter out the metrics logs.