mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -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"
|
||||
)
|
||||
|
||||
(age,) = txn.fetchone()
|
||||
(received_ts,) = txn.fetchone()
|
||||
|
||||
age = self._clock.time_msec() - received_ts
|
||||
|
||||
return count, age
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user