mozilla/socorro — pull request #917 by twobraids (2012-11-02 19:06:43+00:00)
Title: fixes Bug 792082 - Ignore the browser side of plugin-hang reports

this PR adds new features to throttling. Until now, any throttle function accepted only the value of the single key of interest. Now if the key of interest is a "*", then the function is passed the entire raw crash as a dict. This allows more than one field to be checked in the predicate function:

traditional style (not deprecated):
("Product", "Firefox", 10), # accept 10% of crashes where 'Firefox' is the 'Product'

more flexible style:
("*", lambda d: d['Product'] == 'Firefox' and d['Version'] == '98.6', 100), # accept 100% of Firefox 98.6 crashes

This PR also adds the ignore parameter. Instead of a throttling probability, if None appears, then anything matching this rule will be utterly ignored. The client will receive 'Unsupported=1' instead of a crash id.

("*", lambda d: d['Product'] == 'Firefox' and d['Version'] < "10", None), # ignore any crashes from FF less than version 10

All of this so that we can ignore the soon to be deprecated browser side hang crash reports. Notice the new rule in .../scripts/config/collector.py.dist