{"id":862,"date":"2013-04-12T13:31:37","date_gmt":"2013-04-12T17:31:37","guid":{"rendered":"http:\/\/benjamin.smedbergs.us\/blog\/?p=862"},"modified":"2013-04-12T13:31:37","modified_gmt":"2013-04-12T17:31:37","slug":"graph-of-the-day-crash-report-metadata","status":"publish","type":"post","link":"https:\/\/benjamin.smedbergs.us\/blog\/2013-04-12\/graph-of-the-day-crash-report-metadata\/","title":{"rendered":"Graph of the Day: Crash Report Metadata"},"content":{"rendered":"<p>When Firefox crashes, it submits a minidump of the crash; it also submits some key\/value metadata. The metadata includes basic information about the product\/version\/buildid, but it also includes a bunch of other information that we use to group, correlate, and diagnose crashes. Using data collected with <a href=\"https:\/\/github.com\/mozilla\/jydoop\/\">jydoop<\/a>, I created a graph of how frequently various metadata keys were submitted on various platforms:<\/p>\n<p><a href=\"http:\/\/people.mozilla.com\/~bsmedberg\/bsmedberg-graphing-playground\/crash-meta-frequency.html\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/benjamin.smedbergs.us\/blog\/wp-content\/uploads\/2013\/04\/Frequency-of-Crash-Report-Metadata_20130412-112501.png\" alt=\"Frequency of Crash Report Metadata on 2-April-2013\" width=\"1552\" height=\"973\"><\/a><\/p>\n<p>The jydoop script to collect this data is simple:<\/p>\n<pre>import crashstatsutils\r\nimport json\r\nimport jydoop\r\n\r\nsetupjob = crashstatsutils.dosetupjob([('meta_data', 'json'), ('processed_data', 'json')])\r\n\r\ndef map(k, meta_data, processed_data, context):\r\n    if processed_data is None:\r\n        return\r\n\r\n    try:\r\n        meta = json.loads(meta_data)\r\n        processed = json.loads(processed_data)\r\n    except:\r\n        context.write('jsonerror', 1)\r\n        return\r\n\r\n    product = meta['ProductName']\r\n\r\n    os = processed.get('os_name', None)\r\n    if os is None:\r\n        return\r\n\r\n    context.write((product, os, '$total'), 1)\r\n    for key in meta:\r\n        context.write((product, os, key), 1)\r\n\r\ncombine = jydoop.sumreducer\r\nreduce = jydoop.sumreducer<\/pre>\n<p><a href=\"http:\/\/benjamin.smedbergs.us\/blog\/wp-content\/uploads\/2013\/04\/crashmeta-130402.csv\">View the raw data (CSV)<\/a>.<\/p>\n<p>If you are interested in learning what each piece of metadata means and is used for, I&#8217;ve started to document them on <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Crash_Data_Analysis\">the Mozilla docs site<\/a>.<\/p>\n<p>This graph was generated using the <a href=\"http:\/\/www.flotcharts.org\/\">flot JS library<\/a> and the code is <a href=\"https:\/\/github.com\/bsmedberg\/bsmedberg-graphing-playground\/blob\/master\/crash-meta-frequency.html\">available on github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When Firefox crashes, it submits a minidump of the crash; it also submits some key\/value metadata. The metadata includes basic information about the product\/version\/buildid, but it also includes a bunch of other information that we use to group, correlate, and diagnose crashes. Using data collected with jydoop, I created a graph of how frequently various [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[235,277,276,272],"class_list":["post-862","post","type-post","status-publish","format-standard","hentry","category-untagged","tag-crash","tag-flot","tag-graph","tag-jydoop"],"_links":{"self":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/comments?post=862"}],"version-history":[{"count":3,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/862\/revisions"}],"predecessor-version":[{"id":867,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/862\/revisions\/867"}],"wp:attachment":[{"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/media?parent=862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/categories?post=862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/tags?post=862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}