{"action":"created","comment":{"url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/comments/56768013","id":56768013,"diff_hunk":"@@ -41,71 +45,115 @@ var (\n type BuiltinFormat byte\n \n const (\n-\t// SplitBinary encodes the Span in a SplitBinaryCarrier instance.\n+\t// Binary encodes the Span for propagation as opaque binary data.\n+\t//\n+\t// For Tracer.Inject(): the carrier must be an `io.Writer`.\n \t//\n-\t// The `carrier` for injection and extraction must be a\n-\t// `*SplitBinaryCarrier` instance.\n-\tSplitBinary BuiltinFormat = iota\n+\t// For Tracer.Join(): the carrier must be an `io.Reader`.\n+\tBinary BuiltinFormat = iota\n \n-\t// SplitText encodes the Span in a SplitTextCarrier instance.\n+\t// TextMap encodes the Span in a TextMapCarrier instance.\n+\t//\n+\t// For Tracer.Inject(): the carrier must be a `TextMapWriter`.\n+\t//\n+\t// For Tracer.Join(): the carrier must be a `TextMapReader`.\n+\t//\n+\t// See HTTPHeaderTextMapCarrier for an implementation of both TextMapWriter\n+\t// and TextMapReader that defers to an http.Header instance for storage.\n+\t// For example, Inject():\n+\t//\n+\t//    carrier := HTTPHeaderTextMapCarrier(httpReq.Header)\n+\t//    err := span.Tracer().Inject(span, TextMap, carrier)\n \t//\n-\t// The `carrier` for injection and extraction must be a `*SplitTextCarrier`\n-\t// instance.\n+\t// Or Join():\n+\t//\n+\t//    carrier := HTTPHeaderTextMapCarrier(httpReq.Header)\n+\t//    span, err := tracer.Join(\"opName\", TextMap, carrier)\n+\t//\n+\tTextMap\n+\n+\t// SplitBinary is DEPRECATED\n+\tSplitBinary\n+\t// SplitText is DEPRECATED\n \tSplitText\n+)\n+\n+// TextMapWriter is the Inject() carrier for the TextMap builtin format. With\n+// it, the caller can encode a Span for propagation as entries in a multimap of\n+// unicode strings.\n+type TextMapWriter interface {\n+\t// Add a key:value pair to the carrier. Multiple values may be added for a\n+\t// single (repeated) key.","path":"propagation.go","position":61,"original_position":61,"commit_id":"b51adf8cdd399892046a5caea8f0ea8b450c7d4f","original_commit_id":"b51adf8cdd399892046a5caea8f0ea8b450c7d4f","user":{"login":"bensigelman","id":2251553,"avatar_url":"https://avatars.githubusercontent.com/u/2251553?v=3","gravatar_id":"","url":"https://api.github.com/users/bensigelman","html_url":"https://github.com/bensigelman","followers_url":"https://api.github.com/users/bensigelman/followers","following_url":"https://api.github.com/users/bensigelman/following{/other_user}","gists_url":"https://api.github.com/users/bensigelman/gists{/gist_id}","starred_url":"https://api.github.com/users/bensigelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensigelman/subscriptions","organizations_url":"https://api.github.com/users/bensigelman/orgs","repos_url":"https://api.github.com/users/bensigelman/repos","events_url":"https://api.github.com/users/bensigelman/events{/privacy}","received_events_url":"https://api.github.com/users/bensigelman/received_events","type":"User","site_admin":false},"body":"The thinking here basically comes back to the HTTP header spec: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2\r\n\r\nIn particular this tidbit:\r\n\r\n> Multiple message-header fields with the same field-name MAY be present in a message ...\r\n\r\n(though the `...` above has a bunch of caveats about comma-separated values, alternate encodings, etc, etc... so maybe best to stick with `TextMapWriter.Set()` and call it a day)","created_at":"2016-03-20T17:20:04Z","updated_at":"2016-03-20T17:20:04Z","html_url":"https://github.com/opentracing/opentracing-go/pull/74#discussion_r56768013","pull_request_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/comments/56768013"},"html":{"href":"https://github.com/opentracing/opentracing-go/pull/74#discussion_r56768013"},"pull_request":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74","id":63177222,"html_url":"https://github.com/opentracing/opentracing-go/pull/74","diff_url":"https://github.com/opentracing/opentracing-go/pull/74.diff","patch_url":"https://github.com/opentracing/opentracing-go/pull/74.patch","issue_url":"https://api.github.com/repos/opentracing/opentracing-go/issues/74","number":74,"state":"open","locked":false,"title":"Represent the simplified carriers as interfaces","user":{"login":"bensigelman","id":2251553,"avatar_url":"https://avatars.githubusercontent.com/u/2251553?v=3","gravatar_id":"","url":"https://api.github.com/users/bensigelman","html_url":"https://github.com/bensigelman","followers_url":"https://api.github.com/users/bensigelman/followers","following_url":"https://api.github.com/users/bensigelman/following{/other_user}","gists_url":"https://api.github.com/users/bensigelman/gists{/gist_id}","starred_url":"https://api.github.com/users/bensigelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensigelman/subscriptions","organizations_url":"https://api.github.com/users/bensigelman/orgs","repos_url":"https://api.github.com/users/bensigelman/repos","events_url":"https://api.github.com/users/bensigelman/events{/privacy}","received_events_url":"https://api.github.com/users/bensigelman/received_events","type":"User","site_admin":false},"body":"See https://github.com/opentracing/opentracing-go/pull/73 for comparison (and https://github.com/opentracing/opentracing.github.io/issues/73 for context).","created_at":"2016-03-17T06:05:46Z","updated_at":"2016-03-20T17:20:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b4961fd416f0da25656705516e4b5065842854c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74/commits","review_comments_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74/comments","review_comment_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opentracing/opentracing-go/issues/74/comments","statuses_url":"https://api.github.com/repos/opentracing/opentracing-go/statuses/b51adf8cdd399892046a5caea8f0ea8b450c7d4f","head":{"label":"opentracing:interface_carriers","ref":"interface_carriers","sha":"b51adf8cdd399892046a5caea8f0ea8b450c7d4f","user":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"repo":{"id":46904685,"name":"opentracing-go","full_name":"opentracing/opentracing-go","owner":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentracing/opentracing-go","description":"Go implementation of the OpenTracing API","fork":false,"url":"https://api.github.com/repos/opentracing/opentracing-go","forks_url":"https://api.github.com/repos/opentracing/opentracing-go/forks","keys_url":"https://api.github.com/repos/opentracing/opentracing-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentracing/opentracing-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentracing/opentracing-go/teams","hooks_url":"https://api.github.com/repos/opentracing/opentracing-go/hooks","issue_events_url":"https://api.github.com/repos/opentracing/opentracing-go/issues/events{/number}","events_url":"https://api.github.com/repos/opentracing/opentracing-go/events","assignees_url":"https://api.github.com/repos/opentracing/opentracing-go/assignees{/user}","branches_url":"https://api.github.com/repos/opentracing/opentracing-go/branches{/branch}","tags_url":"https://api.github.com/repos/opentracing/opentracing-go/tags","blobs_url":"https://api.github.com/repos/opentracing/opentracing-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentracing/opentracing-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentracing/opentracing-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentracing/opentracing-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentracing/opentracing-go/statuses/{sha}","languages_url":"https://api.github.com/repos/opentracing/opentracing-go/languages","stargazers_url":"https://api.github.com/repos/opentracing/opentracing-go/stargazers","contributors_url":"https://api.github.com/repos/opentracing/opentracing-go/contributors","subscribers_url":"https://api.github.com/repos/opentracing/opentracing-go/subscribers","subscription_url":"https://api.github.com/repos/opentracing/opentracing-go/subscription","commits_url":"https://api.github.com/repos/opentracing/opentracing-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentracing/opentracing-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentracing/opentracing-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentracing/opentracing-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentracing/opentracing-go/contents/{+path}","compare_url":"https://api.github.com/repos/opentracing/opentracing-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentracing/opentracing-go/merges","archive_url":"https://api.github.com/repos/opentracing/opentracing-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentracing/opentracing-go/downloads","issues_url":"https://api.github.com/repos/opentracing/opentracing-go/issues{/number}","pulls_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls{/number}","milestones_url":"https://api.github.com/repos/opentracing/opentracing-go/milestones{/number}","notifications_url":"https://api.github.com/repos/opentracing/opentracing-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentracing/opentracing-go/labels{/name}","releases_url":"https://api.github.com/repos/opentracing/opentracing-go/releases{/id}","deployments_url":"https://api.github.com/repos/opentracing/opentracing-go/deployments","created_at":"2015-11-26T04:52:54Z","updated_at":"2016-03-20T11:30:52Z","pushed_at":"2016-03-20T17:05:38Z","git_url":"git://github.com/opentracing/opentracing-go.git","ssh_url":"git@github.com:opentracing/opentracing-go.git","clone_url":"https://github.com/opentracing/opentracing-go.git","svn_url":"https://github.com/opentracing/opentracing-go","homepage":"http://opentracing.io","size":216,"stargazers_count":100,"watchers_count":100,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":8,"forks":8,"open_issues":8,"watchers":100,"default_branch":"master"}},"base":{"label":"opentracing:master","ref":"master","sha":"57291000a220789cc1c04fd863cc3252b8b62fae","user":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"repo":{"id":46904685,"name":"opentracing-go","full_name":"opentracing/opentracing-go","owner":{"login":"opentracing","id":15482765,"avatar_url":"https://avatars.githubusercontent.com/u/15482765?v=3","gravatar_id":"","url":"https://api.github.com/users/opentracing","html_url":"https://github.com/opentracing","followers_url":"https://api.github.com/users/opentracing/followers","following_url":"https://api.github.com/users/opentracing/following{/other_user}","gists_url":"https://api.github.com/users/opentracing/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing/subscriptions","organizations_url":"https://api.github.com/users/opentracing/orgs","repos_url":"https://api.github.com/users/opentracing/repos","events_url":"https://api.github.com/users/opentracing/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentracing/opentracing-go","description":"Go implementation of the OpenTracing API","fork":false,"url":"https://api.github.com/repos/opentracing/opentracing-go","forks_url":"https://api.github.com/repos/opentracing/opentracing-go/forks","keys_url":"https://api.github.com/repos/opentracing/opentracing-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentracing/opentracing-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentracing/opentracing-go/teams","hooks_url":"https://api.github.com/repos/opentracing/opentracing-go/hooks","issue_events_url":"https://api.github.com/repos/opentracing/opentracing-go/issues/events{/number}","events_url":"https://api.github.com/repos/opentracing/opentracing-go/events","assignees_url":"https://api.github.com/repos/opentracing/opentracing-go/assignees{/user}","branches_url":"https://api.github.com/repos/opentracing/opentracing-go/branches{/branch}","tags_url":"https://api.github.com/repos/opentracing/opentracing-go/tags","blobs_url":"https://api.github.com/repos/opentracing/opentracing-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentracing/opentracing-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentracing/opentracing-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentracing/opentracing-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentracing/opentracing-go/statuses/{sha}","languages_url":"https://api.github.com/repos/opentracing/opentracing-go/languages","stargazers_url":"https://api.github.com/repos/opentracing/opentracing-go/stargazers","contributors_url":"https://api.github.com/repos/opentracing/opentracing-go/contributors","subscribers_url":"https://api.github.com/repos/opentracing/opentracing-go/subscribers","subscription_url":"https://api.github.com/repos/opentracing/opentracing-go/subscription","commits_url":"https://api.github.com/repos/opentracing/opentracing-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentracing/opentracing-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentracing/opentracing-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentracing/opentracing-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentracing/opentracing-go/contents/{+path}","compare_url":"https://api.github.com/repos/opentracing/opentracing-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentracing/opentracing-go/merges","archive_url":"https://api.github.com/repos/opentracing/opentracing-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentracing/opentracing-go/downloads","issues_url":"https://api.github.com/repos/opentracing/opentracing-go/issues{/number}","pulls_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls{/number}","milestones_url":"https://api.github.com/repos/opentracing/opentracing-go/milestones{/number}","notifications_url":"https://api.github.com/repos/opentracing/opentracing-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentracing/opentracing-go/labels{/name}","releases_url":"https://api.github.com/repos/opentracing/opentracing-go/releases{/id}","deployments_url":"https://api.github.com/repos/opentracing/opentracing-go/deployments","created_at":"2015-11-26T04:52:54Z","updated_at":"2016-03-20T11:30:52Z","pushed_at":"2016-03-20T17:05:38Z","git_url":"git://github.com/opentracing/opentracing-go.git","ssh_url":"git@github.com:opentracing/opentracing-go.git","clone_url":"https://github.com/opentracing/opentracing-go.git","svn_url":"https://github.com/opentracing/opentracing-go","homepage":"http://opentracing.io","size":216,"stargazers_count":100,"watchers_count":100,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":8,"forks":8,"open_issues":8,"watchers":100,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74"},"html":{"href":"https://github.com/opentracing/opentracing-go/pull/74"},"issue":{"href":"https://api.github.com/repos/opentracing/opentracing-go/issues/74"},"comments":{"href":"https://api.github.com/repos/opentracing/opentracing-go/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/opentracing/opentracing-go/statuses/b51adf8cdd399892046a5caea8f0ea8b450c7d4f"}}}}