{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments/223994037","pull_request_review_id":163253281,"id":223994037,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzk5NDAzNw==","diff_hunk":"@@ -59,8 +65,13 @@ type Config interface {\n \tConfigFileUsed() string\n \n \tBindPFlag(key string, flag *pflag.Flag) error\n+}\n \n-\t// Datadog specific\n+// DDConfigHelpers describes the config helpers that are not provided by viper.Viper\n+type DDConfigHelpers interface {\n+\t// GetConfigEnvVars returns a list of the non-sensitive env vars that the config supports\n \tGetConfigEnvVars() []string","path":"pkg/config/types.go","position":null,"original_position":23,"commit_id":"79675a29a402159f9f91bf2f7f7ecbeab03f8f70","original_commit_id":"1a73b2e63a434cacf8b08639cb8bc7fc647f2d93","user":{"login":"olivielpeau","id":4912500,"node_id":"MDQ6VXNlcjQ5MTI1MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4912500?v=4","gravatar_id":"","url":"https://api.github.com/users/olivielpeau","html_url":"https://github.com/olivielpeau","followers_url":"https://api.github.com/users/olivielpeau/followers","following_url":"https://api.github.com/users/olivielpeau/following{/other_user}","gists_url":"https://api.github.com/users/olivielpeau/gists{/gist_id}","starred_url":"https://api.github.com/users/olivielpeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivielpeau/subscriptions","organizations_url":"https://api.github.com/users/olivielpeau/orgs","repos_url":"https://api.github.com/users/olivielpeau/repos","events_url":"https://api.github.com/users/olivielpeau/events{/privacy}","received_events_url":"https://api.github.com/users/olivielpeau/received_events","type":"User","site_admin":false},"body":"no apologies needed, your feedback was very welcome :)","created_at":"2018-10-10T09:06:40Z","updated_at":"2018-10-10T09:06:40Z","html_url":"https://github.com/DataDog/datadog-agent/pull/2412#discussion_r223994037","pull_request_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments/223994037"},"html":{"href":"https://github.com/DataDog/datadog-agent/pull/2412#discussion_r223994037"},"pull_request":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412"}},"in_reply_to_id":223607744},"pull_request":{"url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412","id":220462416,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNDYyNDE2","html_url":"https://github.com/DataDog/datadog-agent/pull/2412","diff_url":"https://github.com/DataDog/datadog-agent/pull/2412.diff","patch_url":"https://github.com/DataDog/datadog-agent/pull/2412.patch","issue_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/2412","number":2412,"state":"open","locked":false,"title":"[config] Support new 'site' option in Infra Agent","user":{"login":"olivielpeau","id":4912500,"node_id":"MDQ6VXNlcjQ5MTI1MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4912500?v=4","gravatar_id":"","url":"https://api.github.com/users/olivielpeau","html_url":"https://github.com/olivielpeau","followers_url":"https://api.github.com/users/olivielpeau/followers","following_url":"https://api.github.com/users/olivielpeau/following{/other_user}","gists_url":"https://api.github.com/users/olivielpeau/gists{/gist_id}","starred_url":"https://api.github.com/users/olivielpeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivielpeau/subscriptions","organizations_url":"https://api.github.com/users/olivielpeau/orgs","repos_url":"https://api.github.com/users/olivielpeau/repos","events_url":"https://api.github.com/users/olivielpeau/events{/privacy}","received_events_url":"https://api.github.com/users/olivielpeau/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\n\r\nAdds support of new 'site' option in Infra Agent (for now, other agent components will follow).\r\n\r\n* Overriden by `dd_url` if set\r\n* Should be fully backward compatible\r\n* `dd_url` is not necessarily set on the config anymore. The \"resolved\" URL for the infra Agent should now be accessed with `config.GetMainDomain`. @DataDog/agent-integrations: this means any integration that's trying to access the `dd_url` with `config.get(\"dd_url\")` will not necessarily get a value back, is that an issue?\r\n\r\n### Motivation\r\n\r\nAllows setting the DD site to which the Agent should send data with one single config option that can apply to all agent components (not implemented yet on other components).\r\n\r\n### Additional Notes\r\n\r\n**Look at the first commit for the actual changes needed for the feature.**\r\n\r\nThe other commits are not absolutely necessary, but fix various small things (see commit descriptions).\r\n\r\nThe last commit (https://github.com/DataDog/datadog-agent/pull/2412/commits/3fc2beed1d5c9241108191567564a42379e6d874) is an attempt to make the package easier to unit-test, borne out of frustration of not being able to cleanly test this change :) I can definitely extract it out in a separate PR though.\r\n\r\nTODO in separate PRs:\r\n- [ ] support in logs\r\n- [ ] support in trace: https://github.com/DataDog/datadog-trace-agent/pull/485\r\n- [ ] support in process: https://github.com/DataDog/datadog-process-agent/pull/192\r\n- [ ] support for `DD_SITE` in the install scripts (should be merged after 6.6.0 is out): https://github.com/DataDog/datadog-agent/pull/2414\r\n","created_at":"2018-10-04T17:46:39Z","updated_at":"2018-10-10T09:06:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41556bd1627d58dc368408b4a5996da2b5d36fbb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[{"name":"agent-core","id":1224133,"node_id":"MDQ6VGVhbTEyMjQxMzM=","slug":"agent-core","description":"(formerly Croissant) Core Infra Agent and Agent packaging","privacy":"closed","url":"https://api.github.com/teams/1224133","members_url":"https://api.github.com/teams/1224133/members{/member}","repositories_url":"https://api.github.com/teams/1224133/repos","permission":"pull"}],"labels":[{"id":695415843,"node_id":"MDU6TGFiZWw2OTU0MTU4NDM=","url":"https://api.github.com/repos/DataDog/datadog-agent/labels/team/agent-core","name":"team/agent-core","color":"d4c5f9","default":false}],"milestone":{"url":"https://api.github.com/repos/DataDog/datadog-agent/milestones/36","html_url":"https://github.com/DataDog/datadog-agent/milestone/36","labels_url":"https://api.github.com/repos/DataDog/datadog-agent/milestones/36/labels","id":3611712,"node_id":"MDk6TWlsZXN0b25lMzYxMTcxMg==","number":36,"title":"6.6.0","description":null,"creator":{"login":"truthbk","id":448216,"node_id":"MDQ6VXNlcjQ0ODIxNg==","avatar_url":"https://avatars0.githubusercontent.com/u/448216?v=4","gravatar_id":"","url":"https://api.github.com/users/truthbk","html_url":"https://github.com/truthbk","followers_url":"https://api.github.com/users/truthbk/followers","following_url":"https://api.github.com/users/truthbk/following{/other_user}","gists_url":"https://api.github.com/users/truthbk/gists{/gist_id}","starred_url":"https://api.github.com/users/truthbk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truthbk/subscriptions","organizations_url":"https://api.github.com/users/truthbk/orgs","repos_url":"https://api.github.com/users/truthbk/repos","events_url":"https://api.github.com/users/truthbk/events{/privacy}","received_events_url":"https://api.github.com/users/truthbk/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":45,"state":"open","created_at":"2018-08-30T23:18:53Z","updated_at":"2018-10-09T18:21:42Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412/commits","review_comments_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412/comments","review_comment_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/2412/comments","statuses_url":"https://api.github.com/repos/DataDog/datadog-agent/statuses/79675a29a402159f9f91bf2f7f7ecbeab03f8f70","head":{"label":"DataDog:olivielpeau/new-site-option","ref":"olivielpeau/new-site-option","sha":"79675a29a402159f9f91bf2f7f7ecbeab03f8f70","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":49970739,"node_id":"MDEwOlJlcG9zaXRvcnk0OTk3MDczOQ==","name":"datadog-agent","full_name":"DataDog/datadog-agent","private":false,"owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataDog/datadog-agent","description":"Datadog Agent ","fork":false,"url":"https://api.github.com/repos/DataDog/datadog-agent","forks_url":"https://api.github.com/repos/DataDog/datadog-agent/forks","keys_url":"https://api.github.com/repos/DataDog/datadog-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/datadog-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/datadog-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/datadog-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/datadog-agent/events","assignees_url":"https://api.github.com/repos/DataDog/datadog-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/datadog-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/datadog-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/datadog-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/datadog-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/datadog-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/datadog-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/datadog-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/datadog-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/datadog-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/datadog-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/datadog-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/datadog-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/datadog-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/datadog-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/datadog-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/datadog-agent/merges","archive_url":"https://api.github.com/repos/DataDog/datadog-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/datadog-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/datadog-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/datadog-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/datadog-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/datadog-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/datadog-agent/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/datadog-agent/deployments","created_at":"2016-01-19T17:40:41Z","updated_at":"2018-10-10T03:31:10Z","pushed_at":"2018-10-10T08:44:51Z","git_url":"git://github.com/DataDog/datadog-agent.git","ssh_url":"git@github.com:DataDog/datadog-agent.git","clone_url":"https://github.com/DataDog/datadog-agent.git","svn_url":"https://github.com/DataDog/datadog-agent","homepage":"https://docs.datadoghq.com/","size":30305,"stargazers_count":291,"watchers_count":291,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":157,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":122,"open_issues":157,"watchers":291,"default_branch":"master"}},"base":{"label":"DataDog:master","ref":"master","sha":"0c04a92c115aa290538d246b4d36d522abbec05b","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":49970739,"node_id":"MDEwOlJlcG9zaXRvcnk0OTk3MDczOQ==","name":"datadog-agent","full_name":"DataDog/datadog-agent","private":false,"owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataDog/datadog-agent","description":"Datadog Agent ","fork":false,"url":"https://api.github.com/repos/DataDog/datadog-agent","forks_url":"https://api.github.com/repos/DataDog/datadog-agent/forks","keys_url":"https://api.github.com/repos/DataDog/datadog-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/datadog-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/datadog-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/datadog-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/datadog-agent/events","assignees_url":"https://api.github.com/repos/DataDog/datadog-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/datadog-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/datadog-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/datadog-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/datadog-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/datadog-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/datadog-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/datadog-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/datadog-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/datadog-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/datadog-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/datadog-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/datadog-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/datadog-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/datadog-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/datadog-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/datadog-agent/merges","archive_url":"https://api.github.com/repos/DataDog/datadog-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/datadog-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/datadog-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/datadog-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/datadog-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/datadog-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/datadog-agent/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/datadog-agent/deployments","created_at":"2016-01-19T17:40:41Z","updated_at":"2018-10-10T03:31:10Z","pushed_at":"2018-10-10T08:44:51Z","git_url":"git://github.com/DataDog/datadog-agent.git","ssh_url":"git@github.com:DataDog/datadog-agent.git","clone_url":"https://github.com/DataDog/datadog-agent.git","svn_url":"https://github.com/DataDog/datadog-agent","homepage":"https://docs.datadoghq.com/","size":30305,"stargazers_count":291,"watchers_count":291,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":157,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":122,"open_issues":157,"watchers":291,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412"},"html":{"href":"https://github.com/DataDog/datadog-agent/pull/2412"},"issue":{"href":"https://api.github.com/repos/DataDog/datadog-agent/issues/2412"},"comments":{"href":"https://api.github.com/repos/DataDog/datadog-agent/issues/2412/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2412/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/datadog-agent/statuses/79675a29a402159f9f91bf2f7f7ecbeab03f8f70"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"olivielpeau"}}