mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-11 02:54:20 -05:00
Add more granular event send metrics
This commit is contained in:
parent
bfbc907cec
commit
e0d2f6d5b0
@ -374,6 +374,18 @@ class EventsStore(SQLBaseStore):
|
|||||||
new_forward_extremeties=new_forward_extremeties,
|
new_forward_extremeties=new_forward_extremeties,
|
||||||
)
|
)
|
||||||
persist_event_counter.inc_by(len(chunk))
|
persist_event_counter.inc_by(len(chunk))
|
||||||
|
for event, context in chunk:
|
||||||
|
if context.app_service:
|
||||||
|
origin_type = "local"
|
||||||
|
origin_entity = context.app_service.id
|
||||||
|
elif self.hs.is_mine_id(event.sender):
|
||||||
|
origin_type = "local"
|
||||||
|
origin_entity = "*client*"
|
||||||
|
else:
|
||||||
|
origin_type = "remote"
|
||||||
|
origin_entity = get_domain_from_id(event.sender)
|
||||||
|
|
||||||
|
event_counter.inc(event.type, origin_type, origin_entity)
|
||||||
|
|
||||||
for event, context in chunk:
|
for event, context in chunk:
|
||||||
if context.app_service:
|
if context.app_service:
|
||||||
|
Loading…
Reference in New Issue
Block a user