{"action":"created","comment":{"url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/comments/76552491","id":76552491,"diff_hunk":"@@ -49,22 +51,36 @@ type Span interface {\n \t// may ignore the tag, but shall not panic.\n \tSetTag(key string, value interface{}) Span\n \n-\t// LogEvent() is equivalent to\n+\t// LogFields and LogKV are two ways to record logging data about a Span.\n+\t// Both allow for timestamped key-value logging of arbitrary data. Neither\n+\t// intrinsically supports message formatting; in fact, formatted log\n+\t// messages are discouraged (though not disallowed) in OpenTracing.\n \t//\n-\t//   Log(LogData{Event: event})\n+\t// LogFields is designed to be type-checked, efficient, yet a little\n+\t// cumbersome from the caller's perspective.\n \t//\n-\tLogEvent(event string)\n-\n-\t// LogEventWithPayload() is equivalent to\n+\t// LogKV is designed to minimize boilerplate and leads to concise, readable\n+\t// calling code; unfortunately this also makes it less efficient and less\n+\t// type-safe.\n \t//\n-\t//   Log(LogData{Event: event, Payload: payload0})\n+\t// For example, the following are equivalent:\n \t//\n-\tLogEventWithPayload(event string, payload interface{})\n-\n-\t// Log() records `data` to this Span.\n+\t//    span.LogFields(\n+\t//        opentracing.LogString(\"request_path\", request.Path()),\n+\t//        opentracing.LogInt(\"request_size\", request.Size()))\n \t//\n-\t// See LogData for semantic details.\n-\tLog(data LogData)\n+\t//    span.LogKV(\n+\t//        \"request_path\", request.Path(),\n+\t//        \"request_size\", request.Size())\n+\t//\n+\t// Also see Span.FinishWithOptions() and FinishOptions.BulkLogData.\n+\tLogFields(fields ...LogField)","path":"span.go","position":48,"original_position":48,"commit_id":"d3ef9494d5e7c3306ad1de8588350cb204a6f3dc","original_commit_id":"4305112656d06b9652538da90db625037b29ccfb","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":"Oh: unless you meant to make `LogField` an interface and have the old `LogData` implement it somehow?","created_at":"2016-08-29T04:37:52Z","updated_at":"2016-08-29T04:37:52Z","html_url":"https://github.com/opentracing/opentracing-go/pull/108#discussion_r76552491","pull_request_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/108","_links":{"self":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/comments/76552491"},"html":{"href":"https://github.com/opentracing/opentracing-go/pull/108#discussion_r76552491"},"pull_request":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/108"}}},"pull_request":{"url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/108","id":83032187,"html_url":"https://github.com/opentracing/opentracing-go/pull/108","diff_url":"https://github.com/opentracing/opentracing-go/pull/108.diff","patch_url":"https://github.com/opentracing/opentracing-go/pull/108.patch","issue_url":"https://api.github.com/repos/opentracing/opentracing-go/issues/108","number":108,"state":"open","locked":false,"title":"Introduce key-value Span logging as an RFC","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":"This PR serves two purposes:\r\n- to push the discussion about KV logging forward per https://github.com/opentracing/opentracing.github.io/issues/96\r\n- to illustrate how KV logging might work in Go specifically (which is a little bit of a special case)\r\n\r\nI haven't added all of the helpers that might be in here someday for various common cases, nor have I addressed the implications for implementations (MockTracer, BasicTracer, etc)... if we can come to a consensus about the basic direction I'll happily do so.\r\n\r\nThanks in advance for thoughts about any/all of this.","created_at":"2016-08-29T00:20:54Z","updated_at":"2016-08-29T04:37:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1fb4d634a82776b8a737688fcf1123811f223e7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/108/commits","review_comments_url":"https://api.github.com/repos/opentracing/opentracing-go/pulls/108/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/108/comments","statuses_url":"https://api.github.com/repos/opentracing/opentracing-go/statuses/d3ef9494d5e7c3306ad1de8588350cb204a6f3dc","head":{"label":"opentracing:bhs/spanlog","ref":"bhs/spanlog","sha":"d3ef9494d5e7c3306ad1de8588350cb204a6f3dc","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-08-28T16:55:47Z","pushed_at":"2016-08-29T04:30:17Z","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":305,"stargazers_count":160,"watchers_count":160,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":10,"forks":18,"open_issues":10,"watchers":160,"default_branch":"master"}},"base":{"label":"opentracing:master","ref":"master","sha":"a2a9b4ef5b648dc52c7ebdea071c9b9028b027d7","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-08-28T16:55:47Z","pushed_at":"2016-08-29T04:30:17Z","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":305,"stargazers_count":160,"watchers_count":160,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":10,"forks":18,"open_issues":10,"watchers":160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/108"},"html":{"href":"https://github.com/opentracing/opentracing-go/pull/108"},"issue":{"href":"https://api.github.com/repos/opentracing/opentracing-go/issues/108"},"comments":{"href":"https://api.github.com/repos/opentracing/opentracing-go/issues/108/comments"},"review_comments":{"href":"https://api.github.com/repos/opentracing/opentracing-go/pulls/108/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/108/commits"},"statuses":{"href":"https://api.github.com/repos/opentracing/opentracing-go/statuses/d3ef9494d5e7c3306ad1de8588350cb204a6f3dc"}}}}
{"actor":{"display_login":"bensigelman"}}