{"action":"created","issue":{"url":"https://api.github.com/repos/opbeat/opbeat-node/issues/17","labels_url":"https://api.github.com/repos/opbeat/opbeat-node/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/opbeat/opbeat-node/issues/17/comments","events_url":"https://api.github.com/repos/opbeat/opbeat-node/issues/17/events","html_url":"https://github.com/opbeat/opbeat-node/pull/17","id":57399823,"number":17,"title":"Providing a pre-request method that is called before capturing an uncaught exception","user":{"login":"jbavari","id":1414692,"avatar_url":"https://avatars.githubusercontent.com/u/1414692?v=3","gravatar_id":"","url":"https://api.github.com/users/jbavari","html_url":"https://github.com/jbavari","followers_url":"https://api.github.com/users/jbavari/followers","following_url":"https://api.github.com/users/jbavari/following{/other_user}","gists_url":"https://api.github.com/users/jbavari/gists{/gist_id}","starred_url":"https://api.github.com/users/jbavari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbavari/subscriptions","organizations_url":"https://api.github.com/users/jbavari/orgs","repos_url":"https://api.github.com/users/jbavari/repos","events_url":"https://api.github.com/users/jbavari/events{/privacy}","received_events_url":"https://api.github.com/users/jbavari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-12T00:28:42Z","updated_at":"2015-02-13T16:24:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opbeat/opbeat-node/pulls/17","html_url":"https://github.com/opbeat/opbeat-node/pull/17","diff_url":"https://github.com/opbeat/opbeat-node/pull/17.diff","patch_url":"https://github.com/opbeat/opbeat-node/pull/17.patch"},"body":"This pre-request method will allow users to specify a function of their own to pass back information to opbeat with extra options in the event of an uncaught exception.\r\n\r\nThis is handy - for our use, we would love to be able to track the extras - as far as the users environment, CLI version, other library versions, etc.\r\n\r\nExample usage:\r\n\r\n```javascript\r\nvar reportExtras = function reportExtras() {\r\n  var ionicInfoMod = require('./ionic/info').IonicTask;\r\n  var ionicInfo = new ionicInfoMod();\r\n  var info = ionicInfo.gatherInfo();\r\n  return info;\r\n}\r\n\r\nvar opbeat = require('opbeat')({\r\n  organizationId: 'orgId',\r\n  appId: 'appId',\r\n  secretToken: 'token',\r\n  clientLogLevel: 'fatal',\r\n  prerequestMethod: reportExtras\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/opbeat/opbeat-node/issues/comments/74280607","html_url":"https://github.com/opbeat/opbeat-node/pull/17#issuecomment-74280607","issue_url":"https://api.github.com/repos/opbeat/opbeat-node/issues/17","id":74280607,"user":{"login":"roncohen","id":744,"avatar_url":"https://avatars.githubusercontent.com/u/744?v=3","gravatar_id":"","url":"https://api.github.com/users/roncohen","html_url":"https://github.com/roncohen","followers_url":"https://api.github.com/users/roncohen/followers","following_url":"https://api.github.com/users/roncohen/following{/other_user}","gists_url":"https://api.github.com/users/roncohen/gists{/gist_id}","starred_url":"https://api.github.com/users/roncohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roncohen/subscriptions","organizations_url":"https://api.github.com/users/roncohen/orgs","repos_url":"https://api.github.com/users/roncohen/repos","events_url":"https://api.github.com/users/roncohen/events{/privacy}","received_events_url":"https://api.github.com/users/roncohen/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T16:24:34Z","updated_at":"2015-02-13T16:24:34Z","body":"Hey @jbavari! Seems like a good idea. Any idea why the tests are failing?"}}