-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add metrics to track how often events are soft_failed
#10156
Changes from 1 commit
1d6b946
c71f2c1
7d97ee8
fa4cf59
2970bac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ | |
| ) | ||
|
|
||
| import attr | ||
| from prometheus_client import Counter | ||
| from signedjson.key import decode_verify_key_bytes | ||
| from signedjson.sign import verify_signed_json | ||
| from unpaddedbase64 import decode_base64 | ||
|
|
@@ -101,6 +102,8 @@ | |
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
| soft_failed_event_counter = Counter("synapse_handlers_federation_soft_failed_event", "") | ||
MadLittleMods marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| @attr.s(slots=True) | ||
| class _NewEventInfo: | ||
|
|
@@ -2498,6 +2501,7 @@ async def _check_for_soft_fail( | |
| event_auth.check(room_version_obj, event, auth_events=current_auth_events) | ||
| except AuthError as e: | ||
| logger.warning("Soft-failing %r because %s", event, e) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
To document my additional findings here; We can already use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created #10168 to add these fields |
||
| soft_failed_event_counter.inc() | ||
| event.internal_metadata.soft_failed = True | ||
|
|
||
| async def on_get_missing_events( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.