{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-js/issues/1255","repository_url":"https://api.github.com/repos/getsentry/raven-js","labels_url":"https://api.github.com/repos/getsentry/raven-js/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-js/issues/1255/comments","events_url":"https://api.github.com/repos/getsentry/raven-js/issues/1255/events","html_url":"https://github.com/getsentry/raven-js/pull/1255","id":304296642,"number":1255,"title":"ref(core): Delegate responsibility for creating events to Backend","user":{"login":"jan-auer","id":1433023,"avatar_url":"https://avatars0.githubusercontent.com/u/1433023?v=4","gravatar_id":"","url":"https://api.github.com/users/jan-auer","html_url":"https://github.com/jan-auer","followers_url":"https://api.github.com/users/jan-auer/followers","following_url":"https://api.github.com/users/jan-auer/following{/other_user}","gists_url":"https://api.github.com/users/jan-auer/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-auer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-auer/subscriptions","organizations_url":"https://api.github.com/users/jan-auer/orgs","repos_url":"https://api.github.com/users/jan-auer/repos","events_url":"https://api.github.com/users/jan-auer/events{/privacy}","received_events_url":"https://api.github.com/users/jan-auer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"HazAT","id":363802,"avatar_url":"https://avatars2.githubusercontent.com/u/363802?v=4","gravatar_id":"","url":"https://api.github.com/users/HazAT","html_url":"https://github.com/HazAT","followers_url":"https://api.github.com/users/HazAT/followers","following_url":"https://api.github.com/users/HazAT/following{/other_user}","gists_url":"https://api.github.com/users/HazAT/gists{/gist_id}","starred_url":"https://api.github.com/users/HazAT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HazAT/subscriptions","organizations_url":"https://api.github.com/users/HazAT/orgs","repos_url":"https://api.github.com/users/HazAT/repos","events_url":"https://api.github.com/users/HazAT/events{/privacy}","received_events_url":"https://api.github.com/users/HazAT/received_events","type":"User","site_admin":false},"assignees":[{"login":"HazAT","id":363802,"avatar_url":"https://avatars2.githubusercontent.com/u/363802?v=4","gravatar_id":"","url":"https://api.github.com/users/HazAT","html_url":"https://github.com/HazAT","followers_url":"https://api.github.com/users/HazAT/followers","following_url":"https://api.github.com/users/HazAT/following{/other_user}","gists_url":"https://api.github.com/users/HazAT/gists{/gist_id}","starred_url":"https://api.github.com/users/HazAT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HazAT/subscriptions","organizations_url":"https://api.github.com/users/HazAT/orgs","repos_url":"https://api.github.com/users/HazAT/repos","events_url":"https://api.github.com/users/HazAT/events{/privacy}","received_events_url":"https://api.github.com/users/HazAT/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-03-12T09:33:25Z","updated_at":"2018-03-12T12:52:56Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/getsentry/raven-js/pulls/1255","html_url":"https://github.com/getsentry/raven-js/pull/1255","diff_url":"https://github.com/getsentry/raven-js/pull/1255.diff","patch_url":"https://github.com/getsentry/raven-js/pull/1255.patch"},"body":"This PR moves the place for capturing exceptions and messages from the `Frontend` interface to the `Backend` interface. This has two major effects on the SDK design:\r\n\r\n1. The frontend is now even more generic. Instead of having to implement most of the platform-specific stuff in `Backend` but implementing exceptions and messages in `Frontend`, everything is now in one place. Also, the SDK implementor no longer has to remember to correctly call `this.sendEvent` internally, as the `Frontend` does this automatically now. \r\n2. SDK composition becomes much easier for in some use cases now. This especially applies to Electron, where the `ElectronBackend` needs to create internal instances of the Backends but not the Frontends. \r\n\r\nAside from that, there are two related changes included in this:\r\n\r\n- `Backend.loadContext` should now return a default context instead of an empty one when called for the first time. This allows some SDKs to include platform specific information (such as `context.os`). \r\n- There is a new required abstract method `FrontendBase.getSdkInfo` which must return `{name: string, version: string}`.\r\n\r\n**Tasks:**\r\n\r\n - [x] Change interfaces\r\n - [x] Change the base implementation\r\n - [x] Update `core` tests\r\n - [x] Fix the Browser SDK implementation & tests\r\n - [x] Fix the Node SDK implementation & tests\r\n"},"comment":{"url":"https://api.github.com/repos/getsentry/raven-js/issues/comments/372299096","html_url":"https://github.com/getsentry/raven-js/pull/1255#issuecomment-372299096","issue_url":"https://api.github.com/repos/getsentry/raven-js/issues/1255","id":372299096,"user":{"login":"jan-auer","id":1433023,"avatar_url":"https://avatars0.githubusercontent.com/u/1433023?v=4","gravatar_id":"","url":"https://api.github.com/users/jan-auer","html_url":"https://github.com/jan-auer","followers_url":"https://api.github.com/users/jan-auer/followers","following_url":"https://api.github.com/users/jan-auer/following{/other_user}","gists_url":"https://api.github.com/users/jan-auer/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-auer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-auer/subscriptions","organizations_url":"https://api.github.com/users/jan-auer/orgs","repos_url":"https://api.github.com/users/jan-auer/repos","events_url":"https://api.github.com/users/jan-auer/events{/privacy}","received_events_url":"https://api.github.com/users/jan-auer/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T12:52:55Z","updated_at":"2018-03-12T12:52:55Z","author_association":"MEMBER","body":"@kamilogorek can you please re-review."}}
{"actor":{"display_login":"jan-auer"}}