{"action":"created","issue":{"url":"https://api.github.com/repos/stayallive/wp-sentry/issues/2","repository_url":"https://api.github.com/repos/stayallive/wp-sentry","labels_url":"https://api.github.com/repos/stayallive/wp-sentry/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/stayallive/wp-sentry/issues/2/comments","events_url":"https://api.github.com/repos/stayallive/wp-sentry/issues/2/events","html_url":"https://github.com/stayallive/wp-sentry/pull/2","id":190712632,"number":2,"title":"[WIP] Refactor implementation","user":{"login":"ikappas","id":7887523,"avatar_url":"https://avatars.githubusercontent.com/u/7887523?v=3","gravatar_id":"","url":"https://api.github.com/users/ikappas","html_url":"https://github.com/ikappas","followers_url":"https://api.github.com/users/ikappas/followers","following_url":"https://api.github.com/users/ikappas/following{/other_user}","gists_url":"https://api.github.com/users/ikappas/gists{/gist_id}","starred_url":"https://api.github.com/users/ikappas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikappas/subscriptions","organizations_url":"https://api.github.com/users/ikappas/orgs","repos_url":"https://api.github.com/users/ikappas/repos","events_url":"https://api.github.com/users/ikappas/events{/privacy}","received_events_url":"https://api.github.com/users/ikappas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-11-21T13:11:31Z","updated_at":"2016-11-23T14:43:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/stayallive/wp-sentry/pulls/2","html_url":"https://github.com/stayallive/wp-sentry/pull/2","diff_url":"https://github.com/stayallive/wp-sentry/pull/2.diff","patch_url":"https://github.com/stayallive/wp-sentry/pull/2.patch"},"body":"# Short Description\r\nThis is a proposal for a major refactoring of the project to enable better integration with WordPress.\r\n\r\n# Common Features\r\n- [x] Make plugin work under mu-plugins folder.\r\n- [x] Make plugin work when symlinked.\r\n- [x] Set user context when it is available.\r\n- [x] Add wordpress version tag\r\n- [x] Add `wp_sentry_user_context` filter to allow customization.\r\n- [x] Enable context manipulation on Tracker class instances.\r\n\r\n# PHP Tracker Features\r\n- [x] Load Raven PHP client as early as possible.\r\n- [x] Add php version tag\r\n- [x] Add `wp_sentry_dsn` filter to allow customization.\r\n- [x] Add `wp_sentry_options` filter to allow customization.\r\n\r\n# JS Tracker Features\r\n- [x] Update Raven JS client to v3.8.0\r\n- [x] Load Raven JS client as early as possible.\r\n- [x] Load Raven JS client on admin.\r\n- [x] Load Raven JS client on login.\r\n- [x] Add `wp_sentry_public_dsn` filter to allow customization.\r\n- [x] Add `wp_sentry_public_options` filter to allow customization.\r\n\r\n# Installation\r\nNow the plugin can be installed/symlinked in plugins/mu-plugins directory and work as expected.\r\n\r\nIn order to make best use of the error reporting the suggested installation is in the mu-plugins directory loading it before all other mu-plugins. The following example stub should work load the plugin from the mu-plugins directory (wp_register_plugin_realpath is needed if symlinked)\r\n```php\r\nwp_register_plugin_realpath( WPMU_PLUGIN_DIR . '/wp-sentry-client/wp-sentry.php');\r\nrequire_once( WPMU_PLUGIN_DIR . '/wp-sentry-client/wp-sentry.php');\r\n```\r\nIf you use Bedrock or similar composer based implementation you can use the following composer installers configuration:\r\n```json\r\n\"require\": {\r\n    \"composer/installers\": \"^1.2\",\r\n    \"wpackagist-plugin/wp-sentry-integration\": \"~1.0\"\r\n},\r\n\"extra\": {\r\n    \"installer-paths\": {\r\n      \"web/app/mu-plugins/_sentry\": [\r\n        \"wpackagist-plugin/wp-sentry-integration\"\r\n      ]\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/stayallive/wp-sentry/issues/comments/262530866","html_url":"https://github.com/stayallive/wp-sentry/pull/2#issuecomment-262530866","issue_url":"https://api.github.com/repos/stayallive/wp-sentry/issues/2","id":262530866,"user":{"login":"ikappas","id":7887523,"avatar_url":"https://avatars.githubusercontent.com/u/7887523?v=3","gravatar_id":"","url":"https://api.github.com/users/ikappas","html_url":"https://github.com/ikappas","followers_url":"https://api.github.com/users/ikappas/followers","following_url":"https://api.github.com/users/ikappas/following{/other_user}","gists_url":"https://api.github.com/users/ikappas/gists{/gist_id}","starred_url":"https://api.github.com/users/ikappas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikappas/subscriptions","organizations_url":"https://api.github.com/users/ikappas/orgs","repos_url":"https://api.github.com/users/ikappas/repos","events_url":"https://api.github.com/users/ikappas/events{/privacy}","received_events_url":"https://api.github.com/users/ikappas/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T14:43:06Z","updated_at":"2016-11-23T14:43:06Z","body":"@stayallive Have a look at the WP_Sentry_Php_Tracker filters since they are not always usable.\r\n\r\nDepending on how the plugin is installed these filters may never execute. \r\n\r\nie when installed as mu-plugin/highest priority the plugins will never have a chance to hook.\r\n"}}
{"actor":{"display_login":"ikappas"}}