{"action":"closed","number":121,"pull_request":{"url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/121","id":226976069,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTc2MDY5","html_url":"https://github.com/azavea/district-builder-dtl-pa/pull/121","diff_url":"https://github.com/azavea/district-builder-dtl-pa/pull/121.diff","patch_url":"https://github.com/azavea/district-builder-dtl-pa/pull/121.patch","issue_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/121","number":121,"state":"closed","locked":false,"title":"Add X-Ray instrumentation to Django","user":{"login":"tnation14","id":2507188,"node_id":"MDQ6VXNlcjI1MDcxODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2507188?v=4","gravatar_id":"","url":"https://api.github.com/users/tnation14","html_url":"https://github.com/tnation14","followers_url":"https://api.github.com/users/tnation14/followers","following_url":"https://api.github.com/users/tnation14/following{/other_user}","gists_url":"https://api.github.com/users/tnation14/gists{/gist_id}","starred_url":"https://api.github.com/users/tnation14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnation14/subscriptions","organizations_url":"https://api.github.com/users/tnation14/orgs","repos_url":"https://api.github.com/users/tnation14/repos","events_url":"https://api.github.com/users/tnation14/events{/privacy}","received_events_url":"https://api.github.com/users/tnation14/received_events","type":"User","site_admin":false},"body":"## Overview\r\nInstrument Django app using [AWS X-Ray](https://aws.amazon.com/xray/). This should allow us to better analyze what requests are causing performance issues.\r\n\r\n### Checklist\r\n\r\n- [x] PR has a name that won't get you publicly shamed for vagueness\r\n~- [ ] Files changed in the PR have been `yapf`-ed for style violations~\r\n\r\n### Demo\r\n\r\nOptional. Screenshots, `curl` examples, etc.\r\n\r\n### Notes\r\n\r\n- **X-Ray errors in deployment logs**: when running management commands, Django initializes the X-Ray Middleware and attempts to start recording to a segment, but this fails because there's no active segment open. I followed [these](https://docs.aws.amazon.com/xray-sdk-for-python/latest/reference/configurations.html#context-missing-strategy) instructions to force Django to log an error when that happens (instead of throwing an exception), but the error logs can add a lot of output to CI build logs when running `scripts/update --production` as part of a deploy. This bug doesn't have any impact on the application, it's just annoying and can't (in my understanding) be turned off.\r\n\r\n\r\n## Testing Instructions\r\n\r\n * This has been deployed to Staging\r\n * Visit https://staging.pa.districtbuilder.azavea.com to generate some X-Ray metrics.\r\n * Find the trace in the AWS X-Ray [console](https://console.aws.amazon.com/xray/home?region=us-east-1#/traces)\r\n\r\n\r\nCloses #118 \r\n\r\n","created_at":"2018-10-30T15:44:32Z","updated_at":"2018-10-31T18:37:28Z","closed_at":"2018-10-31T18:37:28Z","merged_at":"2018-10-31T18:37:27Z","merge_commit_sha":"a1917fb8e31871a4fbf2c4d69751f3191bae522d","assignee":{"login":"tnation14","id":2507188,"node_id":"MDQ6VXNlcjI1MDcxODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2507188?v=4","gravatar_id":"","url":"https://api.github.com/users/tnation14","html_url":"https://github.com/tnation14","followers_url":"https://api.github.com/users/tnation14/followers","following_url":"https://api.github.com/users/tnation14/following{/other_user}","gists_url":"https://api.github.com/users/tnation14/gists{/gist_id}","starred_url":"https://api.github.com/users/tnation14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnation14/subscriptions","organizations_url":"https://api.github.com/users/tnation14/orgs","repos_url":"https://api.github.com/users/tnation14/repos","events_url":"https://api.github.com/users/tnation14/events{/privacy}","received_events_url":"https://api.github.com/users/tnation14/received_events","type":"User","site_admin":false},"assignees":[{"login":"tnation14","id":2507188,"node_id":"MDQ6VXNlcjI1MDcxODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2507188?v=4","gravatar_id":"","url":"https://api.github.com/users/tnation14","html_url":"https://github.com/tnation14","followers_url":"https://api.github.com/users/tnation14/followers","following_url":"https://api.github.com/users/tnation14/following{/other_user}","gists_url":"https://api.github.com/users/tnation14/gists{/gist_id}","starred_url":"https://api.github.com/users/tnation14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnation14/subscriptions","organizations_url":"https://api.github.com/users/tnation14/orgs","repos_url":"https://api.github.com/users/tnation14/repos","events_url":"https://api.github.com/users/tnation14/events{/privacy}","received_events_url":"https://api.github.com/users/tnation14/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/121/commits","review_comments_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/121/comments","review_comment_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/121/comments","statuses_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/statuses/b03439c6ee0eef60e737d512ed18594eabb18795","head":{"label":"azavea:feature/jrb/xray-instrumentation","ref":"feature/jrb/xray-instrumentation","sha":"b03439c6ee0eef60e737d512ed18594eabb18795","user":{"login":"azavea","id":595231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NTIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/595231?v=4","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":124141335,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQxNDEzMzU=","name":"district-builder-dtl-pa","full_name":"azavea/district-builder-dtl-pa","private":false,"owner":{"login":"azavea","id":595231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NTIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/595231?v=4","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/azavea/district-builder-dtl-pa","description":"DistrictBuilder is web-based, open source software for collaborative redistricting.","fork":true,"url":"https://api.github.com/repos/azavea/district-builder-dtl-pa","forks_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/forks","keys_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/teams","hooks_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/hooks","issue_events_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/events","assignees_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/tags","blobs_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/languages","stargazers_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/stargazers","contributors_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/contributors","subscribers_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/subscribers","subscription_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/subscription","commits_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/merges","archive_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/downloads","issues_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/labels{/name}","releases_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/deployments","created_at":"2018-03-06T21:33:19Z","updated_at":"2018-10-26T15:45:13Z","pushed_at":"2018-10-31T18:37:28Z","git_url":"git://github.com/azavea/district-builder-dtl-pa.git","ssh_url":"git@github.com:azavea/district-builder-dtl-pa.git","clone_url":"https://github.com/azavea/district-builder-dtl-pa.git","svn_url":"https://github.com/azavea/district-builder-dtl-pa","homepage":"http://www.districtbuilder.org/","size":423549,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":4,"watchers":3,"default_branch":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"2cac50d1053263f8f99e84d9589ad235d966a64b","user":{"login":"azavea","id":595231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NTIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/595231?v=4","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":124141335,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQxNDEzMzU=","name":"district-builder-dtl-pa","full_name":"azavea/district-builder-dtl-pa","private":false,"owner":{"login":"azavea","id":595231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NTIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/595231?v=4","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/azavea/district-builder-dtl-pa","description":"DistrictBuilder is web-based, open source software for collaborative redistricting.","fork":true,"url":"https://api.github.com/repos/azavea/district-builder-dtl-pa","forks_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/forks","keys_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/teams","hooks_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/hooks","issue_events_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/events","assignees_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/tags","blobs_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/languages","stargazers_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/stargazers","contributors_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/contributors","subscribers_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/subscribers","subscription_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/subscription","commits_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/merges","archive_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/downloads","issues_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/labels{/name}","releases_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/district-builder-dtl-pa/deployments","created_at":"2018-03-06T21:33:19Z","updated_at":"2018-10-26T15:45:13Z","pushed_at":"2018-10-31T18:37:28Z","git_url":"git://github.com/azavea/district-builder-dtl-pa.git","ssh_url":"git@github.com:azavea/district-builder-dtl-pa.git","clone_url":"https://github.com/azavea/district-builder-dtl-pa.git","svn_url":"https://github.com/azavea/district-builder-dtl-pa","homepage":"http://www.districtbuilder.org/","size":423549,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":4,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/121"},"html":{"href":"https://github.com/azavea/district-builder-dtl-pa/pull/121"},"issue":{"href":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/121"},"comments":{"href":"https://api.github.com/repos/azavea/district-builder-dtl-pa/issues/121/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/121/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azavea/district-builder-dtl-pa/pulls/121/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/district-builder-dtl-pa/statuses/b03439c6ee0eef60e737d512ed18594eabb18795"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"tnation14","id":2507188,"node_id":"MDQ6VXNlcjI1MDcxODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2507188?v=4","gravatar_id":"","url":"https://api.github.com/users/tnation14","html_url":"https://github.com/tnation14","followers_url":"https://api.github.com/users/tnation14/followers","following_url":"https://api.github.com/users/tnation14/following{/other_user}","gists_url":"https://api.github.com/users/tnation14/gists{/gist_id}","starred_url":"https://api.github.com/users/tnation14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnation14/subscriptions","organizations_url":"https://api.github.com/users/tnation14/orgs","repos_url":"https://api.github.com/users/tnation14/repos","events_url":"https://api.github.com/users/tnation14/events{/privacy}","received_events_url":"https://api.github.com/users/tnation14/received_events","type":"User","site_admin":false},"comments":0,"review_comments":7,"maintainer_can_modify":false,"commits":2,"additions":44,"deletions":5,"changed_files":6}}
{"actor":{"display_login":"tnation14"}}