forked from MirrorHub/synapse
Improve opentracing annotations for Notifier (#10111)
The existing tracing reports an error each time there is a timeout, which isn't really representative. Additionally, we log things about the way `wait_for_events` works (eg, the result of the callback) to the *parent* span, which is confusing.
This commit is contained in:
parent
73636cab69
commit
1d143074c5
2 changed files with 33 additions and 32 deletions
1
changelog.d/10111.misc
Normal file
1
changelog.d/10111.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Improve opentracing annotations for `Notifier`.
|
|
@ -485,6 +485,7 @@ class Notifier:
|
||||||
end_time = self.clock.time_msec() + timeout
|
end_time = self.clock.time_msec() + timeout
|
||||||
|
|
||||||
while not result:
|
while not result:
|
||||||
|
with start_active_span("wait_for_events"):
|
||||||
try:
|
try:
|
||||||
now = self.clock.time_msec()
|
now = self.clock.time_msec()
|
||||||
if end_time <= now:
|
if end_time <= now:
|
||||||
|
@ -499,7 +500,6 @@ class Notifier:
|
||||||
self.hs.get_reactor(),
|
self.hs.get_reactor(),
|
||||||
)
|
)
|
||||||
|
|
||||||
with start_active_span("wait_for_events.deferred"):
|
|
||||||
log_kv(
|
log_kv(
|
||||||
{
|
{
|
||||||
"wait_for_events": "sleep",
|
"wait_for_events": "sleep",
|
||||||
|
|
Loading…
Reference in a new issue