{"action":"created","comment":{"url":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/comments/243591192","pull_request_review_id":187407152,"id":243591192,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzU5MTE5Mg==","diff_hunk":"@@ -28,22 +29,29 @@ import (\n \t\"github.com/census-instrumentation/opencensus-service/receiver\"\n \t\"github.com/census-instrumentation/opencensus-service/receiver/opencensus/ocmetrics\"\n \t\"github.com/census-instrumentation/opencensus-service/receiver/opencensus/octrace\"\n+\t\"github.com/grpc-ecosystem/grpc-gateway/runtime\"","path":"receiver/opencensus/opencensus.go","position":null,"original_position":12,"commit_id":"06622ffed383321682483227a8d6c528e2c26257","original_commit_id":"e6c0b4f8f71d66380bdc685f986868116e86c120","user":{"login":"draffensperger","id":2855507,"node_id":"MDQ6VXNlcjI4NTU1MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/2855507?v=4","gravatar_id":"","url":"https://api.github.com/users/draffensperger","html_url":"https://github.com/draffensperger","followers_url":"https://api.github.com/users/draffensperger/followers","following_url":"https://api.github.com/users/draffensperger/following{/other_user}","gists_url":"https://api.github.com/users/draffensperger/gists{/gist_id}","starred_url":"https://api.github.com/users/draffensperger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draffensperger/subscriptions","organizations_url":"https://api.github.com/users/draffensperger/orgs","repos_url":"https://api.github.com/users/draffensperger/repos","events_url":"https://api.github.com/users/draffensperger/events{/privacy}","received_events_url":"https://api.github.com/users/draffensperger/received_events","type":"User","site_admin":false},"body":"Done, good thought.","created_at":"2018-12-21T14:14:14Z","updated_at":"2018-12-21T14:14:15Z","html_url":"https://github.com/census-instrumentation/opencensus-service/pull/270#discussion_r243591192","pull_request_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/comments/243591192"},"html":{"href":"https://github.com/census-instrumentation/opencensus-service/pull/270#discussion_r243591192"},"pull_request":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270"}},"in_reply_to_id":243490599},"pull_request":{"url":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270","id":238118620,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MTE4NjIw","html_url":"https://github.com/census-instrumentation/opencensus-service/pull/270","diff_url":"https://github.com/census-instrumentation/opencensus-service/pull/270.diff","patch_url":"https://github.com/census-instrumentation/opencensus-service/pull/270.patch","issue_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/issues/270","number":270,"state":"open","locked":false,"title":"Add grpc-gateway for OpenCensus trace receiver","user":{"login":"draffensperger","id":2855507,"node_id":"MDQ6VXNlcjI4NTU1MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/2855507?v=4","gravatar_id":"","url":"https://api.github.com/users/draffensperger","html_url":"https://github.com/draffensperger","followers_url":"https://api.github.com/users/draffensperger/followers","following_url":"https://api.github.com/users/draffensperger/following{/other_user}","gists_url":"https://api.github.com/users/draffensperger/gists{/gist_id}","starred_url":"https://api.github.com/users/draffensperger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draffensperger/subscriptions","organizations_url":"https://api.github.com/users/draffensperger/orgs","repos_url":"https://api.github.com/users/draffensperger/repos","events_url":"https://api.github.com/users/draffensperger/events{/privacy}","received_events_url":"https://api.github.com/users/draffensperger/received_events","type":"User","site_admin":false},"body":"This will allow clients that do not support gRPC (e.g. browsers) to write traces to the agent.\r\n\r\nThis reuses the `collector_http_port` option that was added for the Jaeger receiver, which is typed to `int`. I can modify this to add a new option, e.g. `address_http` typed to string that parallels the `address` option if that's better.\r\n\r\nThis also updates `opencensus-proto` to be pinned to a git commit. Should this wait for a new release of `opencensus-proto` first?\r\n\r\nTo test this change, run the agent locally with an exporter configured and send it a HTTP-JSON request to its HTTP port e.g.:\r\n\r\n```bash\r\nSTART=\"$(date -u +\"%Y-%m-%dT%H:%M\"):00Z\"\r\nEND=\"$(date -u +\"%Y-%m-%dT%H:%M\"):01Z\"\r\nread -r -d '' REQUEST_JSON << EOF\r\n{\r\n   \"node\":{\"identifier\":{\"hostName\":\"test\"}},\r\n   \"spans\":[\r\n      {\r\n          \"traceId\":\"W47/95gDgQPSabYzgT/GDA==\",\r\n          \"spanId\":\"7uGbfsPBsXM=\",\r\n          \"name\":{\"value\":\"test6\"},\r\n          \"startTime\":\"$START\",\r\n          \"endTime\":\"$END\"\r\n      }\r\n   ]\r\n}\r\nEOF\r\ncurl -H \"Content-Type: application/json\" --data \"$REQUEST_JSON\" localhost:55681/v1/trace\r\n```\r\n\r\nNote that the `traceId` and `spanId` fields are base64 encoded, which matches the [standard proto JSON mapping](https://developers.google.com/protocol-buffers/docs/proto3#json) for bytes that grpc-gateway follows.","created_at":"2018-12-12T17:21:34Z","updated_at":"2018-12-21T14:14:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"087935ea4f2e0bc0215bcf81b5a13eeee3b031ae","assignee":null,"assignees":[],"requested_reviewers":[{"login":"bogdandrutu","id":1373887,"node_id":"MDQ6VXNlcjEzNzM4ODc=","avatar_url":"https://avatars0.githubusercontent.com/u/1373887?v=4","gravatar_id":"","url":"https://api.github.com/users/bogdandrutu","html_url":"https://github.com/bogdandrutu","followers_url":"https://api.github.com/users/bogdandrutu/followers","following_url":"https://api.github.com/users/bogdandrutu/following{/other_user}","gists_url":"https://api.github.com/users/bogdandrutu/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdandrutu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdandrutu/subscriptions","organizations_url":"https://api.github.com/users/bogdandrutu/orgs","repos_url":"https://api.github.com/users/bogdandrutu/repos","events_url":"https://api.github.com/users/bogdandrutu/events{/privacy}","received_events_url":"https://api.github.com/users/bogdandrutu/received_events","type":"User","site_admin":false},{"login":"songy23","id":10536136,"node_id":"MDQ6VXNlcjEwNTM2MTM2","avatar_url":"https://avatars3.githubusercontent.com/u/10536136?v=4","gravatar_id":"","url":"https://api.github.com/users/songy23","html_url":"https://github.com/songy23","followers_url":"https://api.github.com/users/songy23/followers","following_url":"https://api.github.com/users/songy23/following{/other_user}","gists_url":"https://api.github.com/users/songy23/gists{/gist_id}","starred_url":"https://api.github.com/users/songy23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songy23/subscriptions","organizations_url":"https://api.github.com/users/songy23/orgs","repos_url":"https://api.github.com/users/songy23/repos","events_url":"https://api.github.com/users/songy23/events{/privacy}","received_events_url":"https://api.github.com/users/songy23/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1066954593,"node_id":"MDU6TGFiZWwxMDY2OTU0NTkz","url":"https://api.github.com/repos/census-instrumentation/opencensus-service/labels/cla:%20yes","name":"cla: yes","color":"25d175","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270/commits","review_comments_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270/comments","review_comment_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/issues/270/comments","statuses_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/statuses/06622ffed383321682483227a8d6c528e2c26257","head":{"label":"draffensperger:grpc-gateway","ref":"grpc-gateway","sha":"06622ffed383321682483227a8d6c528e2c26257","user":{"login":"draffensperger","id":2855507,"node_id":"MDQ6VXNlcjI4NTU1MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/2855507?v=4","gravatar_id":"","url":"https://api.github.com/users/draffensperger","html_url":"https://github.com/draffensperger","followers_url":"https://api.github.com/users/draffensperger/followers","following_url":"https://api.github.com/users/draffensperger/following{/other_user}","gists_url":"https://api.github.com/users/draffensperger/gists{/gist_id}","starred_url":"https://api.github.com/users/draffensperger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draffensperger/subscriptions","organizations_url":"https://api.github.com/users/draffensperger/orgs","repos_url":"https://api.github.com/users/draffensperger/repos","events_url":"https://api.github.com/users/draffensperger/events{/privacy}","received_events_url":"https://api.github.com/users/draffensperger/received_events","type":"User","site_admin":false},"repo":{"id":145636072,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU2MzYwNzI=","name":"opencensus-service","full_name":"draffensperger/opencensus-service","private":false,"owner":{"login":"draffensperger","id":2855507,"node_id":"MDQ6VXNlcjI4NTU1MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/2855507?v=4","gravatar_id":"","url":"https://api.github.com/users/draffensperger","html_url":"https://github.com/draffensperger","followers_url":"https://api.github.com/users/draffensperger/followers","following_url":"https://api.github.com/users/draffensperger/following{/other_user}","gists_url":"https://api.github.com/users/draffensperger/gists{/gist_id}","starred_url":"https://api.github.com/users/draffensperger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draffensperger/subscriptions","organizations_url":"https://api.github.com/users/draffensperger/orgs","repos_url":"https://api.github.com/users/draffensperger/repos","events_url":"https://api.github.com/users/draffensperger/events{/privacy}","received_events_url":"https://api.github.com/users/draffensperger/received_events","type":"User","site_admin":false},"html_url":"https://github.com/draffensperger/opencensus-service","description":"OpenCensus service allows OpenCensus libraries to export to an exporter service rather than having to link vendor-specific exports.","fork":true,"url":"https://api.github.com/repos/draffensperger/opencensus-service","forks_url":"https://api.github.com/repos/draffensperger/opencensus-service/forks","keys_url":"https://api.github.com/repos/draffensperger/opencensus-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/draffensperger/opencensus-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/draffensperger/opencensus-service/teams","hooks_url":"https://api.github.com/repos/draffensperger/opencensus-service/hooks","issue_events_url":"https://api.github.com/repos/draffensperger/opencensus-service/issues/events{/number}","events_url":"https://api.github.com/repos/draffensperger/opencensus-service/events","assignees_url":"https://api.github.com/repos/draffensperger/opencensus-service/assignees{/user}","branches_url":"https://api.github.com/repos/draffensperger/opencensus-service/branches{/branch}","tags_url":"https://api.github.com/repos/draffensperger/opencensus-service/tags","blobs_url":"https://api.github.com/repos/draffensperger/opencensus-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/draffensperger/opencensus-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/draffensperger/opencensus-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/draffensperger/opencensus-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/draffensperger/opencensus-service/statuses/{sha}","languages_url":"https://api.github.com/repos/draffensperger/opencensus-service/languages","stargazers_url":"https://api.github.com/repos/draffensperger/opencensus-service/stargazers","contributors_url":"https://api.github.com/repos/draffensperger/opencensus-service/contributors","subscribers_url":"https://api.github.com/repos/draffensperger/opencensus-service/subscribers","subscription_url":"https://api.github.com/repos/draffensperger/opencensus-service/subscription","commits_url":"https://api.github.com/repos/draffensperger/opencensus-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/draffensperger/opencensus-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/draffensperger/opencensus-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/draffensperger/opencensus-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/draffensperger/opencensus-service/contents/{+path}","compare_url":"https://api.github.com/repos/draffensperger/opencensus-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/draffensperger/opencensus-service/merges","archive_url":"https://api.github.com/repos/draffensperger/opencensus-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/draffensperger/opencensus-service/downloads","issues_url":"https://api.github.com/repos/draffensperger/opencensus-service/issues{/number}","pulls_url":"https://api.github.com/repos/draffensperger/opencensus-service/pulls{/number}","milestones_url":"https://api.github.com/repos/draffensperger/opencensus-service/milestones{/number}","notifications_url":"https://api.github.com/repos/draffensperger/opencensus-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/draffensperger/opencensus-service/labels{/name}","releases_url":"https://api.github.com/repos/draffensperger/opencensus-service/releases{/id}","deployments_url":"https://api.github.com/repos/draffensperger/opencensus-service/deployments","created_at":"2018-08-22T00:51:55Z","updated_at":"2018-08-24T19:51:09Z","pushed_at":"2018-12-21T14:12:11Z","git_url":"git://github.com/draffensperger/opencensus-service.git","ssh_url":"git@github.com:draffensperger/opencensus-service.git","clone_url":"https://github.com/draffensperger/opencensus-service.git","svn_url":"https://github.com/draffensperger/opencensus-service","homepage":null,"size":4990,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"census-instrumentation:master","ref":"master","sha":"d075ce6c6155f2889c71d2389971888345cbee3b","user":{"login":"census-instrumentation","id":26944525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2OTQ0NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/26944525?v=4","gravatar_id":"","url":"https://api.github.com/users/census-instrumentation","html_url":"https://github.com/census-instrumentation","followers_url":"https://api.github.com/users/census-instrumentation/followers","following_url":"https://api.github.com/users/census-instrumentation/following{/other_user}","gists_url":"https://api.github.com/users/census-instrumentation/gists{/gist_id}","starred_url":"https://api.github.com/users/census-instrumentation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/census-instrumentation/subscriptions","organizations_url":"https://api.github.com/users/census-instrumentation/orgs","repos_url":"https://api.github.com/users/census-instrumentation/repos","events_url":"https://api.github.com/users/census-instrumentation/events{/privacy}","received_events_url":"https://api.github.com/users/census-instrumentation/received_events","type":"Organization","site_admin":false},"repo":{"id":135354123,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzNTQxMjM=","name":"opencensus-service","full_name":"census-instrumentation/opencensus-service","private":false,"owner":{"login":"census-instrumentation","id":26944525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2OTQ0NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/26944525?v=4","gravatar_id":"","url":"https://api.github.com/users/census-instrumentation","html_url":"https://github.com/census-instrumentation","followers_url":"https://api.github.com/users/census-instrumentation/followers","following_url":"https://api.github.com/users/census-instrumentation/following{/other_user}","gists_url":"https://api.github.com/users/census-instrumentation/gists{/gist_id}","starred_url":"https://api.github.com/users/census-instrumentation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/census-instrumentation/subscriptions","organizations_url":"https://api.github.com/users/census-instrumentation/orgs","repos_url":"https://api.github.com/users/census-instrumentation/repos","events_url":"https://api.github.com/users/census-instrumentation/events{/privacy}","received_events_url":"https://api.github.com/users/census-instrumentation/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/census-instrumentation/opencensus-service","description":"OpenCensus service allows OpenCensus libraries to export to an exporter service rather than having to link vendor-specific exports.","fork":false,"url":"https://api.github.com/repos/census-instrumentation/opencensus-service","forks_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/forks","keys_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/teams","hooks_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/hooks","issue_events_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/issues/events{/number}","events_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/events","assignees_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/assignees{/user}","branches_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/branches{/branch}","tags_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/tags","blobs_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/statuses/{sha}","languages_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/languages","stargazers_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/stargazers","contributors_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/contributors","subscribers_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/subscribers","subscription_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/subscription","commits_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/contents/{+path}","compare_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/merges","archive_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/downloads","issues_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/issues{/number}","pulls_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls{/number}","milestones_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/milestones{/number}","notifications_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/labels{/name}","releases_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/releases{/id}","deployments_url":"https://api.github.com/repos/census-instrumentation/opencensus-service/deployments","created_at":"2018-05-29T21:19:37Z","updated_at":"2018-12-20T17:30:41Z","pushed_at":"2018-12-21T14:12:12Z","git_url":"git://github.com/census-instrumentation/opencensus-service.git","ssh_url":"git@github.com:census-instrumentation/opencensus-service.git","clone_url":"https://github.com/census-instrumentation/opencensus-service.git","svn_url":"https://github.com/census-instrumentation/opencensus-service","homepage":null,"size":4998,"stargazers_count":48,"watchers_count":48,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":54,"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":17,"open_issues":54,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270"},"html":{"href":"https://github.com/census-instrumentation/opencensus-service/pull/270"},"issue":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/issues/270"},"comments":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/issues/270/comments"},"review_comments":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270/comments"},"review_comment":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/pulls/270/commits"},"statuses":{"href":"https://api.github.com/repos/census-instrumentation/opencensus-service/statuses/06622ffed383321682483227a8d6c528e2c26257"}},"author_association":"NONE"}}
{"actor":{"display_login":"draffensperger"}}