Skip to content

Commit

Permalink
bug 1763225: add throttle rule to raw crash metadata
Browse files Browse the repository at this point in the history
This adds the throttle rule that caused the crash to be accepted to the
raw crash metadata. This lets us debug things down the road.
  • Loading branch information
willkg committed Nov 16, 2022
1 parent d5a41bf commit c2f653c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion antenna/breakpad_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def on_post(self, req, resp):
)
raw_crash["uuid"] = crash_id

# Log the throttle result
# Log throttle result and add to raw crash
logger.info(
"%s: matched by %s; returned %s",
crash_id,
Expand All @@ -373,6 +373,7 @@ def on_post(self, req, resp):
mymetrics.incr(
"throttle", tags=["result:%s" % RESULT_TO_TEXT[throttle_result].lower()]
)
raw_crash["metadata"]["throttle_rule"] = rule_name

# If the result is REJECT, then discard it
if throttle_result is REJECT:
Expand Down
3 changes: 2 additions & 1 deletion tests/unittest/test_fs_crashstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def nix_tmpdir(fn):
+ b'"dump_checksums": '
+ b'{"upload_file_minidump": "e9cee71ab932fde863338d08be4de9dfe39ea049bdafb342ce659ec5450b69ae"}, '
+ b'"payload": "multipart", '
+ b'"payload_compressed": "0"'
+ b'"payload_compressed": "0", '
+ b'"throttle_rule": "accept_everything"'
+ b"}, "
+ b'"submitted_timestamp": "2011-09-06T00:00:00+00:00", '
+ b'"uuid": "de1bb258-cbbf-4589-a673-34f800160918", '
Expand Down

0 comments on commit c2f653c

Please sign in to comment.