mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Fix federation inbound age metric. (#10355)
We should be reporting the age rather than absolute timestamp.
This commit is contained in:
parent
c2c364f27f
commit
879d8c1ee1
1
changelog.d/10355.bugfix
Normal file
1
changelog.d/10355.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix newly added `synapse_federation_server_oldest_inbound_pdu_in_staging` prometheus metric to measure age rather than timestamp.
|
@ -1230,7 +1230,9 @@ class EventFederationWorkerStore(EventsWorkerStore, SignatureWorkerStore, SQLBas
|
|||||||
"SELECT coalesce(min(received_ts), 0) FROM federation_inbound_events_staging"
|
"SELECT coalesce(min(received_ts), 0) FROM federation_inbound_events_staging"
|
||||||
)
|
)
|
||||||
|
|
||||||
(age,) = txn.fetchone()
|
(received_ts,) = txn.fetchone()
|
||||||
|
|
||||||
|
age = self._clock.time_msec() - received_ts
|
||||||
|
|
||||||
return count, age
|
return count, age
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user