{"action":"created","comment":{"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/comments/245278590","pull_request_review_id":189342538,"id":245278590,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTI3ODU5MA==","diff_hunk":"@@ -0,0 +1,95 @@\n+package ttracer\n+\n+import (\n+\t\"time\"\n+\n+\tot \"github.com/opentracing/opentracing-go\"\n+\t\"github.com/pkg/errors\"\n+\tuuid \"github.com/satori/go.uuid\"\n+)\n+\n+// NewWithOptions creates a customized Tracer.\n+func NewWithOptions(opts Options) ot.Tracer {\n+\trval := &tracerImpl{options: opts}\n+\treturn rval\n+}\n+\n+// New creates and returns a standard Tracer which defers completed Spans to\n+// `recorder`.\n+func New(recorder SpanRecorder) ot.Tracer {\n+\topts := DefaultOptions()\n+\topts.Recorder = recorder\n+\treturn NewWithOptions(opts)\n+}\n+\n+type tracerImpl struct {\n+\toptions Options\n+}\n+\n+// StartSpan starts a new span with options and returns it.\n+func (t *tracerImpl) StartSpan(operationName string, opts ...ot.StartSpanOption) ot.Span {\n+\tsso := ot.StartSpanOptions{}\n+\tfor _, o := range opts {\n+\t\to.Apply(&sso)\n+\t}\n+\n+\treturn t.StartSpanWithOptions(operationName, sso)\n+}\n+\n+func (t *tracerImpl) StartSpanWithOptions(operationName string, opts ot.StartSpanOptions) ot.Span {\n+\tstartTime := opts.StartTime\n+\tif startTime.IsZero() {\n+\t\tstartTime = time.Now()\n+\t}\n+\ttags := opts.Tags\n+\tif tags == nil {\n+\t\ttags = map[string]interface{}{}\n+\t}\n+\n+\tnewSpan := t.getSpan()\n+\tfor _, ref := range opts.References {\n+\t\tif ref.Type == ot.ChildOfRef {\n+\t\t\trefSpanCtx := ref.ReferencedContext.(SpanContext)\n+\t\t\tnewSpan.raw.Context.TraceID = refSpanCtx.TraceID\n+\t\t\tnewSpan.raw.Context.SpanID = uuid.NewV4().String()","path":"ttracer/tracer.go","position":54,"original_position":54,"commit_id":"ed01eb9bf0205b69b4a81bfb55533704928084b9","original_commit_id":"ed01eb9bf0205b69b4a81bfb55533704928084b9","user":{"login":"serkan-ozal","id":3143425,"node_id":"MDQ6VXNlcjMxNDM0MjU=","avatar_url":"https://avatars3.githubusercontent.com/u/3143425?v=4","gravatar_id":"","url":"https://api.github.com/users/serkan-ozal","html_url":"https://github.com/serkan-ozal","followers_url":"https://api.github.com/users/serkan-ozal/followers","following_url":"https://api.github.com/users/serkan-ozal/following{/other_user}","gists_url":"https://api.github.com/users/serkan-ozal/gists{/gist_id}","starred_url":"https://api.github.com/users/serkan-ozal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serkan-ozal/subscriptions","organizations_url":"https://api.github.com/users/serkan-ozal/orgs","repos_url":"https://api.github.com/users/serkan-ozal/repos","events_url":"https://api.github.com/users/serkan-ozal/events{/privacy}","received_events_url":"https://api.github.com/users/serkan-ozal/received_events","type":"User","site_admin":false},"body":"`TransactionID` should also get from parent context","created_at":"2019-01-04T11:50:55Z","updated_at":"2019-01-04T11:50:56Z","html_url":"https://github.com/thundra-io/thundra-lambda-agent-go/pull/35#discussion_r245278590","pull_request_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/comments/245278590"},"html":{"href":"https://github.com/thundra-io/thundra-lambda-agent-go/pull/35#discussion_r245278590"},"pull_request":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35","id":241169092,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMTY5MDky","html_url":"https://github.com/thundra-io/thundra-lambda-agent-go/pull/35","diff_url":"https://github.com/thundra-io/thundra-lambda-agent-go/pull/35.diff","patch_url":"https://github.com/thundra-io/thundra-lambda-agent-go/pull/35.patch","issue_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/35","number":35,"state":"open","locked":false,"title":"Implement opentracing and restucture recorder","user":{"login":"hamitb","id":16473976,"node_id":"MDQ6VXNlcjE2NDczOTc2","avatar_url":"https://avatars3.githubusercontent.com/u/16473976?v=4","gravatar_id":"","url":"https://api.github.com/users/hamitb","html_url":"https://github.com/hamitb","followers_url":"https://api.github.com/users/hamitb/followers","following_url":"https://api.github.com/users/hamitb/following{/other_user}","gists_url":"https://api.github.com/users/hamitb/gists{/gist_id}","starred_url":"https://api.github.com/users/hamitb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamitb/subscriptions","organizations_url":"https://api.github.com/users/hamitb/orgs","repos_url":"https://api.github.com/users/hamitb/repos","events_url":"https://api.github.com/users/hamitb/events{/privacy}","received_events_url":"https://api.github.com/users/hamitb/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-27T14:57:23Z","updated_at":"2019-01-04T11:50:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94ec20e551e8e050a3bd3193522bac051f027647","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35/commits","review_comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35/comments","review_comment_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/35/comments","statuses_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/statuses/ed01eb9bf0205b69b4a81bfb55533704928084b9","head":{"label":"thundra-io:refactor/change-recorder-structure","ref":"refactor/change-recorder-structure","sha":"ed01eb9bf0205b69b4a81bfb55533704928084b9","user":{"login":"thundra-io","id":36259632,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjU5NjMy","avatar_url":"https://avatars2.githubusercontent.com/u/36259632?v=4","gravatar_id":"","url":"https://api.github.com/users/thundra-io","html_url":"https://github.com/thundra-io","followers_url":"https://api.github.com/users/thundra-io/followers","following_url":"https://api.github.com/users/thundra-io/following{/other_user}","gists_url":"https://api.github.com/users/thundra-io/gists{/gist_id}","starred_url":"https://api.github.com/users/thundra-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thundra-io/subscriptions","organizations_url":"https://api.github.com/users/thundra-io/orgs","repos_url":"https://api.github.com/users/thundra-io/repos","events_url":"https://api.github.com/users/thundra-io/events{/privacy}","received_events_url":"https://api.github.com/users/thundra-io/received_events","type":"Organization","site_admin":false},"repo":{"id":121881137,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE4ODExMzc=","name":"thundra-lambda-agent-go","full_name":"thundra-io/thundra-lambda-agent-go","private":false,"owner":{"login":"thundra-io","id":36259632,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjU5NjMy","avatar_url":"https://avatars2.githubusercontent.com/u/36259632?v=4","gravatar_id":"","url":"https://api.github.com/users/thundra-io","html_url":"https://github.com/thundra-io","followers_url":"https://api.github.com/users/thundra-io/followers","following_url":"https://api.github.com/users/thundra-io/following{/other_user}","gists_url":"https://api.github.com/users/thundra-io/gists{/gist_id}","starred_url":"https://api.github.com/users/thundra-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thundra-io/subscriptions","organizations_url":"https://api.github.com/users/thundra-io/orgs","repos_url":"https://api.github.com/users/thundra-io/repos","events_url":"https://api.github.com/users/thundra-io/events{/privacy}","received_events_url":"https://api.github.com/users/thundra-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/thundra-io/thundra-lambda-agent-go","description":"Thundra Lambda Go Agent","fork":false,"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go","forks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/forks","keys_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/teams","hooks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/hooks","issue_events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/events{/number}","events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/events","assignees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/assignees{/user}","branches_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/branches{/branch}","tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/tags","blobs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/statuses/{sha}","languages_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/languages","stargazers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/stargazers","contributors_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/contributors","subscribers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/subscribers","subscription_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/subscription","commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/contents/{+path}","compare_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/merges","archive_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/downloads","issues_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues{/number}","pulls_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls{/number}","milestones_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/milestones{/number}","notifications_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/labels{/name}","releases_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/releases{/id}","deployments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/deployments","created_at":"2018-02-17T18:30:02Z","updated_at":"2018-12-24T06:56:53Z","pushed_at":"2019-01-03T12:35:55Z","git_url":"git://github.com/thundra-io/thundra-lambda-agent-go.git","ssh_url":"git@github.com:thundra-io/thundra-lambda-agent-go.git","clone_url":"https://github.com/thundra-io/thundra-lambda-agent-go.git","svn_url":"https://github.com/thundra-io/thundra-lambda-agent-go","homepage":null,"size":1554,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"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":1,"open_issues":1,"watchers":10,"default_branch":"master"}},"base":{"label":"thundra-io:master","ref":"master","sha":"4de2e86f1e6d0b06309f03b9c80346a01f7173d5","user":{"login":"thundra-io","id":36259632,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjU5NjMy","avatar_url":"https://avatars2.githubusercontent.com/u/36259632?v=4","gravatar_id":"","url":"https://api.github.com/users/thundra-io","html_url":"https://github.com/thundra-io","followers_url":"https://api.github.com/users/thundra-io/followers","following_url":"https://api.github.com/users/thundra-io/following{/other_user}","gists_url":"https://api.github.com/users/thundra-io/gists{/gist_id}","starred_url":"https://api.github.com/users/thundra-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thundra-io/subscriptions","organizations_url":"https://api.github.com/users/thundra-io/orgs","repos_url":"https://api.github.com/users/thundra-io/repos","events_url":"https://api.github.com/users/thundra-io/events{/privacy}","received_events_url":"https://api.github.com/users/thundra-io/received_events","type":"Organization","site_admin":false},"repo":{"id":121881137,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE4ODExMzc=","name":"thundra-lambda-agent-go","full_name":"thundra-io/thundra-lambda-agent-go","private":false,"owner":{"login":"thundra-io","id":36259632,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjU5NjMy","avatar_url":"https://avatars2.githubusercontent.com/u/36259632?v=4","gravatar_id":"","url":"https://api.github.com/users/thundra-io","html_url":"https://github.com/thundra-io","followers_url":"https://api.github.com/users/thundra-io/followers","following_url":"https://api.github.com/users/thundra-io/following{/other_user}","gists_url":"https://api.github.com/users/thundra-io/gists{/gist_id}","starred_url":"https://api.github.com/users/thundra-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thundra-io/subscriptions","organizations_url":"https://api.github.com/users/thundra-io/orgs","repos_url":"https://api.github.com/users/thundra-io/repos","events_url":"https://api.github.com/users/thundra-io/events{/privacy}","received_events_url":"https://api.github.com/users/thundra-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/thundra-io/thundra-lambda-agent-go","description":"Thundra Lambda Go Agent","fork":false,"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go","forks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/forks","keys_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/teams","hooks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/hooks","issue_events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/events{/number}","events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/events","assignees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/assignees{/user}","branches_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/branches{/branch}","tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/tags","blobs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/statuses/{sha}","languages_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/languages","stargazers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/stargazers","contributors_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/contributors","subscribers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/subscribers","subscription_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/subscription","commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/contents/{+path}","compare_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/merges","archive_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/downloads","issues_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues{/number}","pulls_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls{/number}","milestones_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/milestones{/number}","notifications_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/labels{/name}","releases_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/releases{/id}","deployments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/deployments","created_at":"2018-02-17T18:30:02Z","updated_at":"2018-12-24T06:56:53Z","pushed_at":"2019-01-03T12:35:55Z","git_url":"git://github.com/thundra-io/thundra-lambda-agent-go.git","ssh_url":"git@github.com:thundra-io/thundra-lambda-agent-go.git","clone_url":"https://github.com/thundra-io/thundra-lambda-agent-go.git","svn_url":"https://github.com/thundra-io/thundra-lambda-agent-go","homepage":null,"size":1554,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"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":1,"open_issues":1,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35"},"html":{"href":"https://github.com/thundra-io/thundra-lambda-agent-go/pull/35"},"issue":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/35"},"comments":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-go/statuses/ed01eb9bf0205b69b4a81bfb55533704928084b9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"serkan-ozal"}}