{"action":"created","comment":{"url":"https://api.github.com/repos/stripe/veneur/pulls/comments/92845228","pull_request_review_id":13368888,"id":92845228,"diff_hunk":"@@ -439,6 +456,68 @@ func resolveEndpoint(endpoint string) (string, error) {\n \treturn origURL.String(), nil\n }\n \n+func (s *Server) flushTraces() {\n+\ttraces := s.TraceWorker.Flush()\n+\n+\tvar finalTraces []*DatadogTraceSpan\n+\ttraces.Do(func(t interface{}) {\n+\t\tif t != nil {\n+\t\t\tspan, ok := t.(ssf.SSFSample)\n+\t\t\tif ok {","path":"flusher.go","position":110,"original_position":110,"commit_id":"85539b1b2374780b13ff23dff36ddad698a851c8","original_commit_id":"85539b1b2374780b13ff23dff36ddad698a851c8","user":{"login":"ChimeraCoder","id":376414,"avatar_url":"https://avatars.githubusercontent.com/u/376414?v=3","gravatar_id":"","url":"https://api.github.com/users/ChimeraCoder","html_url":"https://github.com/ChimeraCoder","followers_url":"https://api.github.com/users/ChimeraCoder/followers","following_url":"https://api.github.com/users/ChimeraCoder/following{/other_user}","gists_url":"https://api.github.com/users/ChimeraCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ChimeraCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChimeraCoder/subscriptions","organizations_url":"https://api.github.com/users/ChimeraCoder/orgs","repos_url":"https://api.github.com/users/ChimeraCoder/repos","events_url":"https://api.github.com/users/ChimeraCoder/events{/privacy}","received_events_url":"https://api.github.com/users/ChimeraCoder/received_events","type":"User","site_admin":false},"body":"Good catch - thanks!","created_at":"2016-12-16T16:48:48Z","updated_at":"2016-12-16T16:48:48Z","html_url":"https://github.com/stripe/veneur/pull/110#discussion_r92845228","pull_request_url":"https://api.github.com/repos/stripe/veneur/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/stripe/veneur/pulls/comments/92845228"},"html":{"href":"https://github.com/stripe/veneur/pull/110#discussion_r92845228"},"pull_request":{"href":"https://api.github.com/repos/stripe/veneur/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/stripe/veneur/pulls/110","id":98231811,"html_url":"https://github.com/stripe/veneur/pull/110","diff_url":"https://github.com/stripe/veneur/pull/110.diff","patch_url":"https://github.com/stripe/veneur/pull/110.patch","issue_url":"https://api.github.com/repos/stripe/veneur/issues/110","number":110,"state":"open","locked":false,"title":"Add tracing support to veneur","user":{"login":"ChimeraCoder","id":376414,"avatar_url":"https://avatars.githubusercontent.com/u/376414?v=3","gravatar_id":"","url":"https://api.github.com/users/ChimeraCoder","html_url":"https://github.com/ChimeraCoder","followers_url":"https://api.github.com/users/ChimeraCoder/followers","following_url":"https://api.github.com/users/ChimeraCoder/following{/other_user}","gists_url":"https://api.github.com/users/ChimeraCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ChimeraCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChimeraCoder/subscriptions","organizations_url":"https://api.github.com/users/ChimeraCoder/orgs","repos_url":"https://api.github.com/users/ChimeraCoder/repos","events_url":"https://api.github.com/users/ChimeraCoder/events{/privacy}","received_events_url":"https://api.github.com/users/ChimeraCoder/received_events","type":"User","site_admin":false},"body":"#### Summary\r\n\r\nAdd tracing support to veneur. This extends Veneur to listen for tracing information submitted over a separate port, which it then flushes to the local tracing agent.\r\n\r\n\r\nIt also adds tracing to two points - the `/import` endpoint and the actual flush operation. I've tested these manually and they show up in the Datadog interface, with two caveats:\r\n\r\n1. The children of `/import` happen very quickly, so the displayed width of those spans is 0. That makes the traces pretty boring - but hey, I said \"Add tracing support to veneur\", not \"Add *interesting* traces to veneur\". \r\n\r\n2. The two traces appear to be sampled weirdly - if the `/import` trace is enabled, we don't see any of the `flush` traces. But if we remove it, we see all of the `flush` traces, so we know they both work. It's unclear whether this is an issue of how we're submitting the traces or an issue of how the tracing agent is sampling them, but it's a separate matter.\r\n\r\n\r\nThis is a WIP, but it's pretty close to ready. I plan on adding some more tests, cleaning up the code, and squashing the commits before calling it \"actually ready\".\r\n\r\n\r\n<img width=\"1370\" alt=\"screenshot 2016-12-15 16 00 15\" src=\"https://cloud.githubusercontent.com/assets/376414/21241843/98778d8c-c2df-11e6-9dcc-86d3faba495c.png\">\r\n\r\n#### Motivation\r\n<!-- Why are you making this change? -->\r\n\r\n\r\n#### Test plan\r\n\r\nTest out tracing and see how it fits in to our workflow!\r\n\r\n\r\n#### Rollout/monitoring/revert plan\r\n\r\nr? @sjung-stripe \r\n\r\n","created_at":"2016-12-15T21:11:38Z","updated_at":"2016-12-16T16:48:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"111c4bd211cc2bbe8e384b69b8a63742bc2ff965","assignee":{"login":"sjung-stripe","id":23090673,"avatar_url":"https://avatars.githubusercontent.com/u/23090673?v=3","gravatar_id":"","url":"https://api.github.com/users/sjung-stripe","html_url":"https://github.com/sjung-stripe","followers_url":"https://api.github.com/users/sjung-stripe/followers","following_url":"https://api.github.com/users/sjung-stripe/following{/other_user}","gists_url":"https://api.github.com/users/sjung-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/sjung-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjung-stripe/subscriptions","organizations_url":"https://api.github.com/users/sjung-stripe/orgs","repos_url":"https://api.github.com/users/sjung-stripe/repos","events_url":"https://api.github.com/users/sjung-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/sjung-stripe/received_events","type":"User","site_admin":false},"assignees":[{"login":"sjung-stripe","id":23090673,"avatar_url":"https://avatars.githubusercontent.com/u/23090673?v=3","gravatar_id":"","url":"https://api.github.com/users/sjung-stripe","html_url":"https://github.com/sjung-stripe","followers_url":"https://api.github.com/users/sjung-stripe/followers","following_url":"https://api.github.com/users/sjung-stripe/following{/other_user}","gists_url":"https://api.github.com/users/sjung-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/sjung-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjung-stripe/subscriptions","organizations_url":"https://api.github.com/users/sjung-stripe/orgs","repos_url":"https://api.github.com/users/sjung-stripe/repos","events_url":"https://api.github.com/users/sjung-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/sjung-stripe/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/stripe/veneur/pulls/110/commits","review_comments_url":"https://api.github.com/repos/stripe/veneur/pulls/110/comments","review_comment_url":"https://api.github.com/repos/stripe/veneur/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stripe/veneur/issues/110/comments","statuses_url":"https://api.github.com/repos/stripe/veneur/statuses/85539b1b2374780b13ff23dff36ddad698a851c8","head":{"label":"stripe:cory-tracing-maybe","ref":"cory-tracing-maybe","sha":"85539b1b2374780b13ff23dff36ddad698a851c8","user":{"login":"stripe","id":856813,"avatar_url":"https://avatars.githubusercontent.com/u/856813?v=3","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"repo":{"id":55277533,"name":"veneur","full_name":"stripe/veneur","owner":{"login":"stripe","id":856813,"avatar_url":"https://avatars.githubusercontent.com/u/856813?v=3","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stripe/veneur","description":"A DogStatsD server implementation with global aggregation capability.","fork":false,"url":"https://api.github.com/repos/stripe/veneur","forks_url":"https://api.github.com/repos/stripe/veneur/forks","keys_url":"https://api.github.com/repos/stripe/veneur/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stripe/veneur/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stripe/veneur/teams","hooks_url":"https://api.github.com/repos/stripe/veneur/hooks","issue_events_url":"https://api.github.com/repos/stripe/veneur/issues/events{/number}","events_url":"https://api.github.com/repos/stripe/veneur/events","assignees_url":"https://api.github.com/repos/stripe/veneur/assignees{/user}","branches_url":"https://api.github.com/repos/stripe/veneur/branches{/branch}","tags_url":"https://api.github.com/repos/stripe/veneur/tags","blobs_url":"https://api.github.com/repos/stripe/veneur/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stripe/veneur/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stripe/veneur/git/refs{/sha}","trees_url":"https://api.github.com/repos/stripe/veneur/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stripe/veneur/statuses/{sha}","languages_url":"https://api.github.com/repos/stripe/veneur/languages","stargazers_url":"https://api.github.com/repos/stripe/veneur/stargazers","contributors_url":"https://api.github.com/repos/stripe/veneur/contributors","subscribers_url":"https://api.github.com/repos/stripe/veneur/subscribers","subscription_url":"https://api.github.com/repos/stripe/veneur/subscription","commits_url":"https://api.github.com/repos/stripe/veneur/commits{/sha}","git_commits_url":"https://api.github.com/repos/stripe/veneur/git/commits{/sha}","comments_url":"https://api.github.com/repos/stripe/veneur/comments{/number}","issue_comment_url":"https://api.github.com/repos/stripe/veneur/issues/comments{/number}","contents_url":"https://api.github.com/repos/stripe/veneur/contents/{+path}","compare_url":"https://api.github.com/repos/stripe/veneur/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stripe/veneur/merges","archive_url":"https://api.github.com/repos/stripe/veneur/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stripe/veneur/downloads","issues_url":"https://api.github.com/repos/stripe/veneur/issues{/number}","pulls_url":"https://api.github.com/repos/stripe/veneur/pulls{/number}","milestones_url":"https://api.github.com/repos/stripe/veneur/milestones{/number}","notifications_url":"https://api.github.com/repos/stripe/veneur/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stripe/veneur/labels{/name}","releases_url":"https://api.github.com/repos/stripe/veneur/releases{/id}","deployments_url":"https://api.github.com/repos/stripe/veneur/deployments","created_at":"2016-04-02T04:24:34Z","updated_at":"2016-12-09T22:24:23Z","pushed_at":"2016-12-15T22:58:42Z","git_url":"git://github.com/stripe/veneur.git","ssh_url":"git@github.com:stripe/veneur.git","clone_url":"https://github.com/stripe/veneur.git","svn_url":"https://github.com/stripe/veneur","homepage":"","size":1963,"stargazers_count":181,"watchers_count":181,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":181,"default_branch":"master"}},"base":{"label":"stripe:master","ref":"master","sha":"942990f96c3ad6618d83d0b9b4d5723b1b4d661e","user":{"login":"stripe","id":856813,"avatar_url":"https://avatars.githubusercontent.com/u/856813?v=3","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"repo":{"id":55277533,"name":"veneur","full_name":"stripe/veneur","owner":{"login":"stripe","id":856813,"avatar_url":"https://avatars.githubusercontent.com/u/856813?v=3","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stripe/veneur","description":"A DogStatsD server implementation with global aggregation capability.","fork":false,"url":"https://api.github.com/repos/stripe/veneur","forks_url":"https://api.github.com/repos/stripe/veneur/forks","keys_url":"https://api.github.com/repos/stripe/veneur/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stripe/veneur/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stripe/veneur/teams","hooks_url":"https://api.github.com/repos/stripe/veneur/hooks","issue_events_url":"https://api.github.com/repos/stripe/veneur/issues/events{/number}","events_url":"https://api.github.com/repos/stripe/veneur/events","assignees_url":"https://api.github.com/repos/stripe/veneur/assignees{/user}","branches_url":"https://api.github.com/repos/stripe/veneur/branches{/branch}","tags_url":"https://api.github.com/repos/stripe/veneur/tags","blobs_url":"https://api.github.com/repos/stripe/veneur/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stripe/veneur/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stripe/veneur/git/refs{/sha}","trees_url":"https://api.github.com/repos/stripe/veneur/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stripe/veneur/statuses/{sha}","languages_url":"https://api.github.com/repos/stripe/veneur/languages","stargazers_url":"https://api.github.com/repos/stripe/veneur/stargazers","contributors_url":"https://api.github.com/repos/stripe/veneur/contributors","subscribers_url":"https://api.github.com/repos/stripe/veneur/subscribers","subscription_url":"https://api.github.com/repos/stripe/veneur/subscription","commits_url":"https://api.github.com/repos/stripe/veneur/commits{/sha}","git_commits_url":"https://api.github.com/repos/stripe/veneur/git/commits{/sha}","comments_url":"https://api.github.com/repos/stripe/veneur/comments{/number}","issue_comment_url":"https://api.github.com/repos/stripe/veneur/issues/comments{/number}","contents_url":"https://api.github.com/repos/stripe/veneur/contents/{+path}","compare_url":"https://api.github.com/repos/stripe/veneur/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stripe/veneur/merges","archive_url":"https://api.github.com/repos/stripe/veneur/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stripe/veneur/downloads","issues_url":"https://api.github.com/repos/stripe/veneur/issues{/number}","pulls_url":"https://api.github.com/repos/stripe/veneur/pulls{/number}","milestones_url":"https://api.github.com/repos/stripe/veneur/milestones{/number}","notifications_url":"https://api.github.com/repos/stripe/veneur/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stripe/veneur/labels{/name}","releases_url":"https://api.github.com/repos/stripe/veneur/releases{/id}","deployments_url":"https://api.github.com/repos/stripe/veneur/deployments","created_at":"2016-04-02T04:24:34Z","updated_at":"2016-12-09T22:24:23Z","pushed_at":"2016-12-15T22:58:42Z","git_url":"git://github.com/stripe/veneur.git","ssh_url":"git@github.com:stripe/veneur.git","clone_url":"https://github.com/stripe/veneur.git","svn_url":"https://github.com/stripe/veneur","homepage":"","size":1963,"stargazers_count":181,"watchers_count":181,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":181,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stripe/veneur/pulls/110"},"html":{"href":"https://github.com/stripe/veneur/pull/110"},"issue":{"href":"https://api.github.com/repos/stripe/veneur/issues/110"},"comments":{"href":"https://api.github.com/repos/stripe/veneur/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/stripe/veneur/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/stripe/veneur/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stripe/veneur/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/stripe/veneur/statuses/85539b1b2374780b13ff23dff36ddad698a851c8"}}}}
{"actor":{"display_login":"ChimeraCoder"}}