{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/216383801","pull_request_review_id":153848470,"id":216383801,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjM4MzgwMQ==","diff_hunk":"@@ -64,7 +64,49 @@ def test_send(self):\n         transport.send(record, message, _GLOBAL_RESOURCE, None)\n \n         transport.worker.enqueue.assert_called_once_with(\n-            record, message, _GLOBAL_RESOURCE, None)\n+            record, message, _GLOBAL_RESOURCE, None, None, None)\n+\n+    def test_trace_send(self):\n+        from google.cloud.logging.logger import _GLOBAL_RESOURCE\n+\n+        client = _Client(self.PROJECT)\n+        name = 'python_logger'\n+\n+        transport, _ = self._make_one(client, name)\n+\n+        python_logger_name = 'mylogger'\n+        message = 'hello world'\n+        trace = 'the-project/trace/longlogTraceid'\n+\n+        record = logging.LogRecord(\n+            python_logger_name, logging.INFO,\n+            None, None, message, trace, None)","path":"logging/tests/unit/handlers/transports/test_background_thread.py","position":21,"original_position":21,"commit_id":"38a52b228ed3993333a09e7f4700214f4efe707e","original_commit_id":"38a52b228ed3993333a09e7f4700214f4efe707e","user":{"login":"tseaver","id":242750,"node_id":"MDQ6VXNlcjI0Mjc1MA==","avatar_url":"https://avatars2.githubusercontent.com/u/242750?v=4","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"body":"Python's [`logging.LogRecord`](https://docs.python.org/3/library/logging.html#logging.LogRecord) does not take `trace` or `span_id` as arguments.","created_at":"2018-09-10T16:16:37Z","updated_at":"2018-09-10T16:19:44Z","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5908#discussion_r216383801","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/216383801"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5908#discussion_r216383801"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908","id":214220240,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MjIwMjQw","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5908","diff_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5908.diff","patch_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5908.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5908","number":5908,"state":"open","locked":false,"title":"Add trace and span_id to logging async API","user":{"login":"brunoais","id":639467,"node_id":"MDQ6VXNlcjYzOTQ2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/639467?v=4","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"body":"Follow up to #5885 and #5878. Add function parameters on the logging async API to allow API logging with trace and span_id in a non-blocking way.","created_at":"2018-09-10T07:25:46Z","updated_at":"2018-09-10T16:19:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"245e14b7a636c97ebc6656656602fcf1889dfe62","assignee":null,"assignees":[],"requested_reviewers":[{"login":"theacodes","id":250995,"node_id":"MDQ6VXNlcjI1MDk5NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/250995?v=4","gravatar_id":"","url":"https://api.github.com/users/theacodes","html_url":"https://github.com/theacodes","followers_url":"https://api.github.com/users/theacodes/followers","following_url":"https://api.github.com/users/theacodes/following{/other_user}","gists_url":"https://api.github.com/users/theacodes/gists{/gist_id}","starred_url":"https://api.github.com/users/theacodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theacodes/subscriptions","organizations_url":"https://api.github.com/users/theacodes/orgs","repos_url":"https://api.github.com/users/theacodes/repos","events_url":"https://api.github.com/users/theacodes/events{/privacy}","received_events_url":"https://api.github.com/users/theacodes/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":131682747,"node_id":"MDU6TGFiZWwxMzE2ODI3NDc=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/cla:%20yes","name":"cla: yes","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5908/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/38a52b228ed3993333a09e7f4700214f4efe707e","head":{"label":"brunoais:add-trace-span_id-to-async-log-api","ref":"add-trace-span_id-to-async-log-api","sha":"38a52b228ed3993333a09e7f4700214f4efe707e","user":{"login":"brunoais","id":639467,"node_id":"MDQ6VXNlcjYzOTQ2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/639467?v=4","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"repo":{"id":148113019,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgxMTMwMTk=","name":"google-cloud-python","full_name":"brunoais/google-cloud-python","owner":{"login":"brunoais","id":639467,"node_id":"MDQ6VXNlcjYzOTQ2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/639467?v=4","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brunoais/google-cloud-python","description":"Google Cloud Client Library for Python","fork":true,"url":"https://api.github.com/repos/brunoais/google-cloud-python","forks_url":"https://api.github.com/repos/brunoais/google-cloud-python/forks","keys_url":"https://api.github.com/repos/brunoais/google-cloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brunoais/google-cloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brunoais/google-cloud-python/teams","hooks_url":"https://api.github.com/repos/brunoais/google-cloud-python/hooks","issue_events_url":"https://api.github.com/repos/brunoais/google-cloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/brunoais/google-cloud-python/events","assignees_url":"https://api.github.com/repos/brunoais/google-cloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/brunoais/google-cloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/brunoais/google-cloud-python/tags","blobs_url":"https://api.github.com/repos/brunoais/google-cloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brunoais/google-cloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brunoais/google-cloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/brunoais/google-cloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brunoais/google-cloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/brunoais/google-cloud-python/languages","stargazers_url":"https://api.github.com/repos/brunoais/google-cloud-python/stargazers","contributors_url":"https://api.github.com/repos/brunoais/google-cloud-python/contributors","subscribers_url":"https://api.github.com/repos/brunoais/google-cloud-python/subscribers","subscription_url":"https://api.github.com/repos/brunoais/google-cloud-python/subscription","commits_url":"https://api.github.com/repos/brunoais/google-cloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/brunoais/google-cloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/brunoais/google-cloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/brunoais/google-cloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/brunoais/google-cloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/brunoais/google-cloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brunoais/google-cloud-python/merges","archive_url":"https://api.github.com/repos/brunoais/google-cloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brunoais/google-cloud-python/downloads","issues_url":"https://api.github.com/repos/brunoais/google-cloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/brunoais/google-cloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/brunoais/google-cloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/brunoais/google-cloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brunoais/google-cloud-python/labels{/name}","releases_url":"https://api.github.com/repos/brunoais/google-cloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/brunoais/google-cloud-python/deployments","created_at":"2018-09-10T07:01:31Z","updated_at":"2018-09-10T07:01:39Z","pushed_at":"2018-09-10T08:51:40Z","git_url":"git://github.com/brunoais/google-cloud-python.git","ssh_url":"git@github.com:brunoais/google-cloud-python.git","clone_url":"https://github.com/brunoais/google-cloud-python.git","svn_url":"https://github.com/brunoais/google-cloud-python","homepage":"https://googlecloudplatform.github.io/google-cloud-python/","size":274045,"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":{"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"de5b775811d914270df3249ac24e165964c10dd2","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":16316451,"node_id":"MDEwOlJlcG9zaXRvcnkxNjMxNjQ1MQ==","name":"google-cloud-python","full_name":"GoogleCloudPlatform/google-cloud-python","owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python","description":"Google Cloud Client Library for Python","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/deployments","created_at":"2014-01-28T15:51:47Z","updated_at":"2018-09-10T15:59:01Z","pushed_at":"2018-09-10T15:49:49Z","git_url":"git://github.com/GoogleCloudPlatform/google-cloud-python.git","ssh_url":"git@github.com:GoogleCloudPlatform/google-cloud-python.git","clone_url":"https://github.com/GoogleCloudPlatform/google-cloud-python.git","svn_url":"https://github.com/GoogleCloudPlatform/google-cloud-python","homepage":"https://googlecloudplatform.github.io/google-cloud-python/","size":274069,"stargazers_count":1734,"watchers_count":1734,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":744,"mirror_url":null,"archived":false,"open_issues_count":113,"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":744,"open_issues":113,"watchers":1734,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5908"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5908"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5908/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5908/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/38a52b228ed3993333a09e7f4700214f4efe707e"}},"author_association":"NONE"}}
{"actor":{"display_login":"tseaver"}}