Open Eochs opened 8 years ago
(If we want user -> repo interest graph)
{ "id": "3203436343", "type": "PullRequestReviewCommentEvent", "actor": { "id": 375744, "login": "mattrobenolt", "gravatar_id": "", "url": "https:\/\/api.github.com\/users\/mattrobenolt", "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/375744?" }, "repo": { "id": 873328, "name": "getsentry\/sentry", "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry" }, "payload": { "action": "created", "comment": { "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/comments\/41055781", "id": 41055781, "diff_hunk": "@@ -23,8 +23,14 @@ def _wrapped(*args, **kwargs):\n instance = '{}.{}'.format(name, stat_suffix(*args, **kwargs))\n else:\n instance = name\n- with metrics.timer(key, instance=instance):\n- result = func(*args, **kwargs)\n+ with metrics.timer(key, instance=instance) as tags:\n+ try:\n+ result = func(*args, **kwargs)\n+ except Exception:\n+ tags['result'] = 'failure'\n+ raise\n+ else:\n+ tags['result'] = 'success'", "path": "src\/sentry\/tasks\/base.py", "position": 13, "original_position": 13, "commit_id": "4c14b0c8a8d5a4f62185b08c1c0e5f34a9707367", "original_commit_id": "4c14b0c8a8d5a4f62185b08c1c0e5f34a9707367", "user": { "login": "mattrobenolt", "id": 375744, "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/375744?v=3", "gravatar_id": "", "url": "https:\/\/api.github.com\/users\/mattrobenolt", "html_url": "https:\/\/github.com\/mattrobenolt", "followers_url": "https:\/\/api.github.com\/users\/mattrobenolt\/followers", "following_url": "https:\/\/api.github.com\/users\/mattrobenolt\/following{\/other_user}", "gists_url": "https:\/\/api.github.com\/users\/mattrobenolt\/gists{\/gist_id}", "starred_url": "https:\/\/api.github.com\/users\/mattrobenolt\/starred{\/owner}{\/repo}", "subscriptions_url": "https:\/\/api.github.com\/users\/mattrobenolt\/subscriptions", "organizations_url": "https:\/\/api.github.com\/users\/mattrobenolt\/orgs", "repos_url": "https:\/\/api.github.com\/users\/mattrobenolt\/repos", "events_url": "https:\/\/api.github.com\/users\/mattrobenolt\/events{\/privacy}", "received_events_url": "https:\/\/api.github.com\/users\/mattrobenolt\/received_events", "type": "User", "site_admin": false }, "body": "That seems reasonable to me.", "created_at": "2015-10-02T19:00:04Z", "updated_at": "2015-10-02T19:00:04Z", "html_url": "https:\/\/github.com\/getsentry\/sentry\/pull\/2080#discussion_r41055781", "pull_request_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080", "_links": { "self": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/comments\/41055781" }, "html": { "href": "https:\/\/github.com\/getsentry\/sentry\/pull\/2080#discussion_r41055781" }, "pull_request": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080" } } }, "pull_request": { "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080", "id": 46669480, "html_url": "https:\/\/github.com\/getsentry\/sentry\/pull\/2080", "diff_url": "https:\/\/github.com\/getsentry\/sentry\/pull\/2080.diff", "patch_url": "https:\/\/github.com\/getsentry\/sentry\/pull\/2080.patch", "issue_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/2080", "number": 2080, "state": "open", "locked": false, "title": "Add `result` tag to `jobs.duration` metric.", "user": { "login": "tkaemming", "id": 65315, "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/65315?v=3", "gravatar_id": "", "url": "https:\/\/api.github.com\/users\/tkaemming", "html_url": "https:\/\/github.com\/tkaemming", "followers_url": "https:\/\/api.github.com\/users\/tkaemming\/followers", "following_url": "https:\/\/api.github.com\/users\/tkaemming\/following{\/other_user}", "gists_url": "https:\/\/api.github.com\/users\/tkaemming\/gists{\/gist_id}", "starred_url": "https:\/\/api.github.com\/users\/tkaemming\/starred{\/owner}{\/repo}", "subscriptions_url": "https:\/\/api.github.com\/users\/tkaemming\/subscriptions", "organizations_url": "https:\/\/api.github.com\/users\/tkaemming\/orgs", "repos_url": "https:\/\/api.github.com\/users\/tkaemming\/repos", "events_url": "https:\/\/api.github.com\/users\/tkaemming\/events{\/privacy}", "received_events_url": "https:\/\/api.github.com\/users\/tkaemming\/received_events", "type": "User", "site_admin": false }, "body": "This allows us to track success and failures of specific job types and results\r\nin a metric that looks like the following:\r\n\r\n 2015-10-02 18:53:19,054 8201 DEBUG sentry.metrics 'jobs.duration': 1.88351e-05 ms; instance='sentry.tasks.store.preprocess_event'; tags={'result': 'failure'}\r\n\r\nThis also fixes an oversight in the logging backend for metrics (tags are a dictionary, not a list.)", "created_at": "2015-10-02T18:56:42Z", "updated_at": "2015-10-02T19:00:04Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "e300489bd233d1376c7a39d26e94189e020f73ce", "assignee": null, "milestone": null, "commits_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080\/commits", "review_comments_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080\/comments", "review_comment_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/comments{\/number}", "comments_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/2080\/comments", "statuses_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/statuses\/4c14b0c8a8d5a4f62185b08c1c0e5f34a9707367", "head": { "label": "getsentry:task-results", "ref": "task-results", "sha": "4c14b0c8a8d5a4f62185b08c1c0e5f34a9707367", "user": { "login": "getsentry", "id": 1396951, "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/1396951?v=3", "gravatar_id": "", "url": "https:\/\/api.github.com\/users\/getsentry", "html_url": "https:\/\/github.com\/getsentry", "followers_url": "https:\/\/api.github.com\/users\/getsentry\/followers", "following_url": "https:\/\/api.github.com\/users\/getsentry\/following{\/other_user}", "gists_url": "https:\/\/api.github.com\/users\/getsentry\/gists{\/gist_id}", "starred_url": "https:\/\/api.github.com\/users\/getsentry\/starred{\/owner}{\/repo}", "subscriptions_url": "https:\/\/api.github.com\/users\/getsentry\/subscriptions", "organizations_url": "https:\/\/api.github.com\/users\/getsentry\/orgs", "repos_url": "https:\/\/api.github.com\/users\/getsentry\/repos", "events_url": "https:\/\/api.github.com\/users\/getsentry\/events{\/privacy}", "received_events_url": "https:\/\/api.github.com\/users\/getsentry\/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 873328, "name": "sentry", "full_name": "getsentry\/sentry", "owner": { "login": "getsentry", "id": 1396951, "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/1396951?v=3", "gravatar_id": "", "url": "https:\/\/api.github.com\/users\/getsentry", "html_url": "https:\/\/github.com\/getsentry", "followers_url": "https:\/\/api.github.com\/users\/getsentry\/followers", "following_url": "https:\/\/api.github.com\/users\/getsentry\/following{\/other_user}", "gists_url": "https:\/\/api.github.com\/users\/getsentry\/gists{\/gist_id}", "starred_url": "https:\/\/api.github.com\/users\/getsentry\/starred{\/owner}{\/repo}", "subscriptions_url": "https:\/\/api.github.com\/users\/getsentry\/subscriptions", "organizations_url": "https:\/\/api.github.com\/users\/getsentry\/orgs", "repos_url": "https:\/\/api.github.com\/users\/getsentry\/repos", "events_url": "https:\/\/api.github.com\/users\/getsentry\/events{\/privacy}", "received_events_url": "https:\/\/api.github.com\/users\/getsentry\/received_events", "type": "Organization", "site_admin": false }, "private": false, "html_url": "https:\/\/github.com\/getsentry\/sentry", "description": "Sentry is a realtime, platform-agnostic error logging and aggregation platform", "fork": false, "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry", "forks_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/forks", "keys_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/keys{\/key_id}", "collaborators_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/collaborators{\/collaborator}", "teams_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/teams", "hooks_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/hooks", "issue_events_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/events{\/number}", "events_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/events", "assignees_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/assignees{\/user}", "branches_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/branches{\/branch}", "tags_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/tags", "blobs_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/blobs{\/sha}", "git_tags_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/tags{\/sha}", "git_refs_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/refs{\/sha}", "trees_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/trees{\/sha}", "statuses_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/statuses\/{sha}", "languages_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/languages", "stargazers_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/stargazers", "contributors_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/contributors", "subscribers_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/subscribers", "subscription_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/subscription", "commits_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/commits{\/sha}", "git_commits_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/commits{\/sha}", "comments_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/comments{\/number}", "issue_comment_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/comments{\/number}", "contents_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/contents\/{+path}", "compare_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/compare\/{base}...{head}", "merges_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/merges", "archive_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/{archive_format}{\/ref}", "downloads_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/downloads", "issues_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues{\/number}", "pulls_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls{\/number}", "milestones_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/milestones{\/number}", "notifications_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/notifications{?since,all,participating}", "labels_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/labels{\/name}", "releases_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/releases{\/id}", "created_at": "2010-08-30T22:06:41Z", "updated_at": "2015-10-02T05:57:46Z", "pushed_at": "2015-10-02T18:58:50Z", "git_url": "git:\/\/github.com\/getsentry\/sentry.git", "ssh_url": "git@github.com:getsentry\/sentry.git", "clone_url": "https:\/\/github.com\/getsentry\/sentry.git", "svn_url": "https:\/\/github.com\/getsentry\/sentry", "homepage": "https:\/\/getsentry.com", "size": 74351, "stargazers_count": 7621, "watchers_count": 7621, "language": "Python", "has_issues": true, "has_downloads": true, "has_wiki": false, "has_pages": false, "forks_count": 898, "mirror_url": null, "open_issues_count": 160, "forks": 898, "open_issues": 160, "watchers": 7621, "default_branch": "master" } }, "base": { "label": "getsentry:master", "ref": "master", "sha": "bb7a228e094503d3cb5154c79f992df72dbc317c", "user": { "login": "getsentry", "id": 1396951, "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/1396951?v=3", "gravatar_id": "", "url": "https:\/\/api.github.com\/users\/getsentry", "html_url": "https:\/\/github.com\/getsentry", "followers_url": "https:\/\/api.github.com\/users\/getsentry\/followers", "following_url": "https:\/\/api.github.com\/users\/getsentry\/following{\/other_user}", "gists_url": "https:\/\/api.github.com\/users\/getsentry\/gists{\/gist_id}", "starred_url": "https:\/\/api.github.com\/users\/getsentry\/starred{\/owner}{\/repo}", "subscriptions_url": "https:\/\/api.github.com\/users\/getsentry\/subscriptions", "organizations_url": "https:\/\/api.github.com\/users\/getsentry\/orgs", "repos_url": "https:\/\/api.github.com\/users\/getsentry\/repos", "events_url": "https:\/\/api.github.com\/users\/getsentry\/events{\/privacy}", "received_events_url": "https:\/\/api.github.com\/users\/getsentry\/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 873328, "name": "sentry", "full_name": "getsentry\/sentry", "owner": { "login": "getsentry", "id": 1396951, "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/1396951?v=3", "gravatar_id": "", "url": "https:\/\/api.github.com\/users\/getsentry", "html_url": "https:\/\/github.com\/getsentry", "followers_url": "https:\/\/api.github.com\/users\/getsentry\/followers", "following_url": "https:\/\/api.github.com\/users\/getsentry\/following{\/other_user}", "gists_url": "https:\/\/api.github.com\/users\/getsentry\/gists{\/gist_id}", "starred_url": "https:\/\/api.github.com\/users\/getsentry\/starred{\/owner}{\/repo}", "subscriptions_url": "https:\/\/api.github.com\/users\/getsentry\/subscriptions", "organizations_url": "https:\/\/api.github.com\/users\/getsentry\/orgs", "repos_url": "https:\/\/api.github.com\/users\/getsentry\/repos", "events_url": "https:\/\/api.github.com\/users\/getsentry\/events{\/privacy}", "received_events_url": "https:\/\/api.github.com\/users\/getsentry\/received_events", "type": "Organization", "site_admin": false }, "private": false, "html_url": "https:\/\/github.com\/getsentry\/sentry", "description": "Sentry is a realtime, platform-agnostic error logging and aggregation platform", "fork": false, "url": "https:\/\/api.github.com\/repos\/getsentry\/sentry", "forks_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/forks", "keys_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/keys{\/key_id}", "collaborators_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/collaborators{\/collaborator}", "teams_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/teams", "hooks_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/hooks", "issue_events_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/events{\/number}", "events_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/events", "assignees_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/assignees{\/user}", "branches_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/branches{\/branch}", "tags_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/tags", "blobs_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/blobs{\/sha}", "git_tags_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/tags{\/sha}", "git_refs_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/refs{\/sha}", "trees_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/trees{\/sha}", "statuses_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/statuses\/{sha}", "languages_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/languages", "stargazers_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/stargazers", "contributors_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/contributors", "subscribers_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/subscribers", "subscription_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/subscription", "commits_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/commits{\/sha}", "git_commits_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/git\/commits{\/sha}", "comments_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/comments{\/number}", "issue_comment_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/comments{\/number}", "contents_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/contents\/{+path}", "compare_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/compare\/{base}...{head}", "merges_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/merges", "archive_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/{archive_format}{\/ref}", "downloads_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/downloads", "issues_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues{\/number}", "pulls_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls{\/number}", "milestones_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/milestones{\/number}", "notifications_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/notifications{?since,all,participating}", "labels_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/labels{\/name}", "releases_url": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/releases{\/id}", "created_at": "2010-08-30T22:06:41Z", "updated_at": "2015-10-02T05:57:46Z", "pushed_at": "2015-10-02T18:58:50Z", "git_url": "git:\/\/github.com\/getsentry\/sentry.git", "ssh_url": "git@github.com:getsentry\/sentry.git", "clone_url": "https:\/\/github.com\/getsentry\/sentry.git", "svn_url": "https:\/\/github.com\/getsentry\/sentry", "homepage": "https:\/\/getsentry.com", "size": 74351, "stargazers_count": 7621, "watchers_count": 7621, "language": "Python", "has_issues": true, "has_downloads": true, "has_wiki": false, "has_pages": false, "forks_count": 898, "mirror_url": null, "open_issues_count": 160, "forks": 898, "open_issues": 160, "watchers": 7621, "default_branch": "master" } }, "_links": { "self": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080" }, "html": { "href": "https:\/\/github.com\/getsentry\/sentry\/pull\/2080" }, "issue": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/2080" }, "comments": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/issues\/2080\/comments" }, "review_comments": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080\/comments" }, "review_comment": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/comments{\/number}" }, "commits": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/pulls\/2080\/commits" }, "statuses": { "href": "https:\/\/api.github.com\/repos\/getsentry\/sentry\/statuses\/4c14b0c8a8d5a4f62185b08c1c0e5f34a9707367" } } } }, "public": true, "created_at": "2015-10-02T19:00:04Z", "org": { "id": 1396951, "login": "getsentry", "gravatar_id": "", "url": "https:\/\/api.github.com\/orgs\/getsentry", "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/1396951?" } }
Interest:
(If we want user -> repo interest graph)