{"action":"created","comment":{"url":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/comments/168655386","pull_request_review_id":97061390,"id":168655386,"diff_hunk":"@@ -0,0 +1,126 @@\n+import wrapt\n+from collections import namedtuple\n+\n+from aws_xray_sdk.core import xray_recorder\n+from aws_xray_sdk.core.models import http\n+from aws_xray_sdk.ext.util import inject_trace_header\n+\n+import ssl\n+\n+\n+_XRAY_PROP = '_xray_prop'\n+_XRay_Data = namedtuple('xray_data', ['method', 'host', 'url'])\n+\n+\n+# ? is not a valid entity, and we don't want things after the ? for the segment name\n+def _strip_url(url: str):","path":"aws_xray_sdk/ext/httplib/patch.py","position":null,"original_position":16,"commit_id":"ffd771c174dbe401c8732da969f543711bf58e8d","original_commit_id":"53a57788035b097fd15262eca9fea5f6c0b80248","user":{"login":"thehesiod","id":4001789,"avatar_url":"https://avatars1.githubusercontent.com/u/4001789?v=4","gravatar_id":"","url":"https://api.github.com/users/thehesiod","html_url":"https://github.com/thehesiod","followers_url":"https://api.github.com/users/thehesiod/followers","following_url":"https://api.github.com/users/thehesiod/following{/other_user}","gists_url":"https://api.github.com/users/thehesiod/gists{/gist_id}","starred_url":"https://api.github.com/users/thehesiod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehesiod/subscriptions","organizations_url":"https://api.github.com/users/thehesiod/orgs","repos_url":"https://api.github.com/users/thehesiod/repos","events_url":"https://api.github.com/users/thehesiod/events{/privacy}","received_events_url":"https://api.github.com/users/thehesiod/received_events","type":"User","site_admin":false},"body":"moved, didn't put the None check as that's a fairly low-level API and you'll get an exception of operating on a 'None' already...thoughts?","created_at":"2018-02-16T01:12:26Z","updated_at":"2018-02-16T01:12:26Z","html_url":"https://github.com/aws/aws-xray-sdk-python/pull/19#discussion_r168655386","pull_request_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/comments/168655386"},"html":{"href":"https://github.com/aws/aws-xray-sdk-python/pull/19#discussion_r168655386"},"pull_request":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19"}},"in_reply_to_id":168646746},"pull_request":{"url":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19","id":168955037,"html_url":"https://github.com/aws/aws-xray-sdk-python/pull/19","diff_url":"https://github.com/aws/aws-xray-sdk-python/pull/19.diff","patch_url":"https://github.com/aws/aws-xray-sdk-python/pull/19.patch","issue_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/issues/19","number":19,"state":"open","locked":false,"title":"httplib support","user":{"login":"thehesiod","id":4001789,"avatar_url":"https://avatars1.githubusercontent.com/u/4001789?v=4","gravatar_id":"","url":"https://api.github.com/users/thehesiod","html_url":"https://github.com/thehesiod","followers_url":"https://api.github.com/users/thehesiod/followers","following_url":"https://api.github.com/users/thehesiod/following{/other_user}","gists_url":"https://api.github.com/users/thehesiod/gists{/gist_id}","starred_url":"https://api.github.com/users/thehesiod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehesiod/subscriptions","organizations_url":"https://api.github.com/users/thehesiod/orgs","repos_url":"https://api.github.com/users/thehesiod/repos","events_url":"https://api.github.com/users/thehesiod/events{/privacy}","received_events_url":"https://api.github.com/users/thehesiod/received_events","type":"User","site_admin":false},"body":"This is what we're going to use in production.  It's important for tracing things like the old google API, which uses httplib2 which uses httplib.\r\n\r\nNOTE: perhaps this should replace the requests patch as requests uses httplib\r\n\r\nfixes: https://github.com/aws/aws-xray-sdk-python/issues/20","created_at":"2018-02-13T21:02:32Z","updated_at":"2018-02-16T01:12:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69632501517e357f82a53a3f7cb3ab368f21cd94","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":695940840,"url":"https://api.github.com/repos/aws/aws-xray-sdk-python/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19/commits","review_comments_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19/comments","review_comment_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/issues/19/comments","statuses_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/statuses/ffd771c174dbe401c8732da969f543711bf58e8d","head":{"label":"thehesiod:thehesiod/httplib","ref":"thehesiod/httplib","sha":"ffd771c174dbe401c8732da969f543711bf58e8d","user":{"login":"thehesiod","id":4001789,"avatar_url":"https://avatars1.githubusercontent.com/u/4001789?v=4","gravatar_id":"","url":"https://api.github.com/users/thehesiod","html_url":"https://github.com/thehesiod","followers_url":"https://api.github.com/users/thehesiod/followers","following_url":"https://api.github.com/users/thehesiod/following{/other_user}","gists_url":"https://api.github.com/users/thehesiod/gists{/gist_id}","starred_url":"https://api.github.com/users/thehesiod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehesiod/subscriptions","organizations_url":"https://api.github.com/users/thehesiod/orgs","repos_url":"https://api.github.com/users/thehesiod/repos","events_url":"https://api.github.com/users/thehesiod/events{/privacy}","received_events_url":"https://api.github.com/users/thehesiod/received_events","type":"User","site_admin":false},"repo":{"id":121434389,"name":"aws-xray-sdk-python","full_name":"thehesiod/aws-xray-sdk-python","owner":{"login":"thehesiod","id":4001789,"avatar_url":"https://avatars1.githubusercontent.com/u/4001789?v=4","gravatar_id":"","url":"https://api.github.com/users/thehesiod","html_url":"https://github.com/thehesiod","followers_url":"https://api.github.com/users/thehesiod/followers","following_url":"https://api.github.com/users/thehesiod/following{/other_user}","gists_url":"https://api.github.com/users/thehesiod/gists{/gist_id}","starred_url":"https://api.github.com/users/thehesiod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehesiod/subscriptions","organizations_url":"https://api.github.com/users/thehesiod/orgs","repos_url":"https://api.github.com/users/thehesiod/repos","events_url":"https://api.github.com/users/thehesiod/events{/privacy}","received_events_url":"https://api.github.com/users/thehesiod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thehesiod/aws-xray-sdk-python","description":"AWS X-Ray SDK for the Python programming language","fork":true,"url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python","forks_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/forks","keys_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/teams","hooks_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/hooks","issue_events_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/issues/events{/number}","events_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/events","assignees_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/assignees{/user}","branches_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/branches{/branch}","tags_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/tags","blobs_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/statuses/{sha}","languages_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/languages","stargazers_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/stargazers","contributors_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/contributors","subscribers_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/subscribers","subscription_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/subscription","commits_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/contents/{+path}","compare_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/merges","archive_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/downloads","issues_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/issues{/number}","pulls_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/pulls{/number}","milestones_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/milestones{/number}","notifications_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/labels{/name}","releases_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/releases{/id}","deployments_url":"https://api.github.com/repos/thehesiod/aws-xray-sdk-python/deployments","created_at":"2018-02-13T20:43:33Z","updated_at":"2018-02-13T20:43:35Z","pushed_at":"2018-02-16T01:11:42Z","git_url":"git://github.com/thehesiod/aws-xray-sdk-python.git","ssh_url":"git@github.com:thehesiod/aws-xray-sdk-python.git","clone_url":"https://github.com/thehesiod/aws-xray-sdk-python.git","svn_url":"https://github.com/thehesiod/aws-xray-sdk-python","homepage":null,"size":246,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aws:master","ref":"master","sha":"0b00e4b653767c0d67d65978ac2e4399ca223b38","user":{"login":"aws","id":2232217,"avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":103969019,"name":"aws-xray-sdk-python","full_name":"aws/aws-xray-sdk-python","owner":{"login":"aws","id":2232217,"avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aws/aws-xray-sdk-python","description":"AWS X-Ray SDK for the Python programming language","fork":false,"url":"https://api.github.com/repos/aws/aws-xray-sdk-python","forks_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/forks","keys_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/teams","hooks_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/events","assignees_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/tags","blobs_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/languages","stargazers_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/subscription","commits_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/merges","archive_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/downloads","issues_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/releases{/id}","deployments_url":"https://api.github.com/repos/aws/aws-xray-sdk-python/deployments","created_at":"2017-09-18T17:17:30Z","updated_at":"2018-02-15T12:20:40Z","pushed_at":"2018-02-16T01:11:43Z","git_url":"git://github.com/aws/aws-xray-sdk-python.git","ssh_url":"git@github.com:aws/aws-xray-sdk-python.git","clone_url":"https://github.com/aws/aws-xray-sdk-python.git","svn_url":"https://github.com/aws/aws-xray-sdk-python","homepage":null,"size":239,"stargazers_count":52,"watchers_count":52,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":16,"open_issues":6,"watchers":52,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19"},"html":{"href":"https://github.com/aws/aws-xray-sdk-python/pull/19"},"issue":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/issues/19"},"comments":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/aws/aws-xray-sdk-python/statuses/ffd771c174dbe401c8732da969f543711bf58e8d"}},"author_association":"NONE"}}
{"actor":{"display_login":"thehesiod"}}