{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/comments/143948828","pull_request_review_id":68533120,"id":143948828,"diff_hunk":"@@ -36,8 +37,8 @@ def ready(self):\n         # AgentWriter, it breaks all tests. The configure() behavior must\n         # be changed to use it in this integration\n         tracer.enabled = settings.ENABLED\n-        tracer.writer.api.hostname = settings.AGENT_HOSTNAME\n-        tracer.writer.api.port = settings.AGENT_PORT\n+        tracer.writer.api.hostname = os.environ.get(\"DATADOG_TRACE_AGENT_HOSTNAME\") or settings.AGENT_HOSTNAME","path":"ddtrace/contrib/django/apps.py","position":12,"original_position":12,"commit_id":"d20ac60ad564e7ff1aa8ef5eda05f446e5bb347d","original_commit_id":"8b677483352c81cdaf773d1ba273f76d538d65cd","user":{"login":"palazzem","id":1560405,"avatar_url":"https://avatars2.githubusercontent.com/u/1560405?v=4","gravatar_id":"","url":"https://api.github.com/users/palazzem","html_url":"https://github.com/palazzem","followers_url":"https://api.github.com/users/palazzem/followers","following_url":"https://api.github.com/users/palazzem/following{/other_user}","gists_url":"https://api.github.com/users/palazzem/gists{/gist_id}","starred_url":"https://api.github.com/users/palazzem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palazzem/subscriptions","organizations_url":"https://api.github.com/users/palazzem/orgs","repos_url":"https://api.github.com/users/palazzem/repos","events_url":"https://api.github.com/users/palazzem/events{/privacy}","received_events_url":"https://api.github.com/users/palazzem/received_events","type":"User","site_admin":false},"body":"Yes I think so; a right answer is difficult on such topic since it depends on framework / language conventions. Anyway, what I really want is being sure that with my suggestion your Django application works as you expect. Happy to review and then merge your PR!\r\n\r\nThank you for taking time investigating and providing very good references!","created_at":"2017-10-11T08:55:26Z","updated_at":"2017-10-11T08:55:26Z","html_url":"https://github.com/DataDog/dd-trace-py/pull/354#discussion_r143948828","pull_request_url":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/comments/143948828"},"html":{"href":"https://github.com/DataDog/dd-trace-py/pull/354#discussion_r143948828"},"pull_request":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354"}},"in_reply_to_id":141914926},"pull_request":{"url":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354","id":143796031,"html_url":"https://github.com/DataDog/dd-trace-py/pull/354","diff_url":"https://github.com/DataDog/dd-trace-py/pull/354.diff","patch_url":"https://github.com/DataDog/dd-trace-py/pull/354.patch","issue_url":"https://api.github.com/repos/DataDog/dd-trace-py/issues/354","number":354,"state":"open","locked":false,"title":"Respect env agent host and port in Django apps","user":{"login":"spesnova","id":261700,"avatar_url":"https://avatars0.githubusercontent.com/u/261700?v=4","gravatar_id":"","url":"https://api.github.com/users/spesnova","html_url":"https://github.com/spesnova","followers_url":"https://api.github.com/users/spesnova/followers","following_url":"https://api.github.com/users/spesnova/following{/other_user}","gists_url":"https://api.github.com/users/spesnova/gists{/gist_id}","starred_url":"https://api.github.com/users/spesnova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spesnova/subscriptions","organizations_url":"https://api.github.com/users/spesnova/orgs","repos_url":"https://api.github.com/users/spesnova/repos","events_url":"https://api.github.com/users/spesnova/events{/privacy}","received_events_url":"https://api.github.com/users/spesnova/received_events","type":"User","site_admin":false},"body":"## What does this PR do?\r\nEnable to override agent hostname and port via `DATADOG_TRACE_AGENT_HOSTNAME` and `DATADOG_TRACE_AGENT_PORT` .\r\n\r\n## Motivation\r\nTo make dd-trace-py for Django work as expected.\r\n\r\nCurrently, dd-trace-py for Django ignores those environment variables in spite of [the document](http://pypi.datadoghq.com/trace/docs/#get-started) says it can be override via those environment variables.\r\n\r\n## Additional Notes\r\nThis PR fixes https://github.com/DataDog/dd-trace-py/issues/332\r\n","created_at":"2017-09-29T02:36:15Z","updated_at":"2017-10-11T08:55:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb8918a133118b155cc3ecb2fe8c1fa751886b74","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354/commits","review_comments_url":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354/comments","review_comment_url":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/dd-trace-py/issues/354/comments","statuses_url":"https://api.github.com/repos/DataDog/dd-trace-py/statuses/d20ac60ad564e7ff1aa8ef5eda05f446e5bb347d","head":{"label":"spesnova:django-environment-variable","ref":"django-environment-variable","sha":"d20ac60ad564e7ff1aa8ef5eda05f446e5bb347d","user":{"login":"spesnova","id":261700,"avatar_url":"https://avatars0.githubusercontent.com/u/261700?v=4","gravatar_id":"","url":"https://api.github.com/users/spesnova","html_url":"https://github.com/spesnova","followers_url":"https://api.github.com/users/spesnova/followers","following_url":"https://api.github.com/users/spesnova/following{/other_user}","gists_url":"https://api.github.com/users/spesnova/gists{/gist_id}","starred_url":"https://api.github.com/users/spesnova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spesnova/subscriptions","organizations_url":"https://api.github.com/users/spesnova/orgs","repos_url":"https://api.github.com/users/spesnova/repos","events_url":"https://api.github.com/users/spesnova/events{/privacy}","received_events_url":"https://api.github.com/users/spesnova/received_events","type":"User","site_admin":false},"repo":{"id":105127468,"name":"dd-trace-py","full_name":"spesnova/dd-trace-py","owner":{"login":"spesnova","id":261700,"avatar_url":"https://avatars0.githubusercontent.com/u/261700?v=4","gravatar_id":"","url":"https://api.github.com/users/spesnova","html_url":"https://github.com/spesnova","followers_url":"https://api.github.com/users/spesnova/followers","following_url":"https://api.github.com/users/spesnova/following{/other_user}","gists_url":"https://api.github.com/users/spesnova/gists{/gist_id}","starred_url":"https://api.github.com/users/spesnova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spesnova/subscriptions","organizations_url":"https://api.github.com/users/spesnova/orgs","repos_url":"https://api.github.com/users/spesnova/repos","events_url":"https://api.github.com/users/spesnova/events{/privacy}","received_events_url":"https://api.github.com/users/spesnova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spesnova/dd-trace-py","description":"python trace client","fork":true,"url":"https://api.github.com/repos/spesnova/dd-trace-py","forks_url":"https://api.github.com/repos/spesnova/dd-trace-py/forks","keys_url":"https://api.github.com/repos/spesnova/dd-trace-py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spesnova/dd-trace-py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spesnova/dd-trace-py/teams","hooks_url":"https://api.github.com/repos/spesnova/dd-trace-py/hooks","issue_events_url":"https://api.github.com/repos/spesnova/dd-trace-py/issues/events{/number}","events_url":"https://api.github.com/repos/spesnova/dd-trace-py/events","assignees_url":"https://api.github.com/repos/spesnova/dd-trace-py/assignees{/user}","branches_url":"https://api.github.com/repos/spesnova/dd-trace-py/branches{/branch}","tags_url":"https://api.github.com/repos/spesnova/dd-trace-py/tags","blobs_url":"https://api.github.com/repos/spesnova/dd-trace-py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spesnova/dd-trace-py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spesnova/dd-trace-py/git/refs{/sha}","trees_url":"https://api.github.com/repos/spesnova/dd-trace-py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spesnova/dd-trace-py/statuses/{sha}","languages_url":"https://api.github.com/repos/spesnova/dd-trace-py/languages","stargazers_url":"https://api.github.com/repos/spesnova/dd-trace-py/stargazers","contributors_url":"https://api.github.com/repos/spesnova/dd-trace-py/contributors","subscribers_url":"https://api.github.com/repos/spesnova/dd-trace-py/subscribers","subscription_url":"https://api.github.com/repos/spesnova/dd-trace-py/subscription","commits_url":"https://api.github.com/repos/spesnova/dd-trace-py/commits{/sha}","git_commits_url":"https://api.github.com/repos/spesnova/dd-trace-py/git/commits{/sha}","comments_url":"https://api.github.com/repos/spesnova/dd-trace-py/comments{/number}","issue_comment_url":"https://api.github.com/repos/spesnova/dd-trace-py/issues/comments{/number}","contents_url":"https://api.github.com/repos/spesnova/dd-trace-py/contents/{+path}","compare_url":"https://api.github.com/repos/spesnova/dd-trace-py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spesnova/dd-trace-py/merges","archive_url":"https://api.github.com/repos/spesnova/dd-trace-py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spesnova/dd-trace-py/downloads","issues_url":"https://api.github.com/repos/spesnova/dd-trace-py/issues{/number}","pulls_url":"https://api.github.com/repos/spesnova/dd-trace-py/pulls{/number}","milestones_url":"https://api.github.com/repos/spesnova/dd-trace-py/milestones{/number}","notifications_url":"https://api.github.com/repos/spesnova/dd-trace-py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spesnova/dd-trace-py/labels{/name}","releases_url":"https://api.github.com/repos/spesnova/dd-trace-py/releases{/id}","deployments_url":"https://api.github.com/repos/spesnova/dd-trace-py/deployments","created_at":"2017-09-28T09:11:53Z","updated_at":"2017-09-28T09:11:55Z","pushed_at":"2017-10-02T02:36:58Z","git_url":"git://github.com/spesnova/dd-trace-py.git","ssh_url":"git@github.com:spesnova/dd-trace-py.git","clone_url":"https://github.com/spesnova/dd-trace-py.git","svn_url":"https://github.com/spesnova/dd-trace-py","homepage":"http://pypi.datadoghq.com/trace/docs/","size":1425,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DataDog:master","ref":"master","sha":"7c0795da7308a7fff6f9855fd4e026adcba3ef9f","user":{"login":"DataDog","id":365230,"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":61572326,"name":"dd-trace-py","full_name":"DataDog/dd-trace-py","owner":{"login":"DataDog","id":365230,"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},"private":false,"html_url":"https://github.com/DataDog/dd-trace-py","description":"python trace client","fork":false,"url":"https://api.github.com/repos/DataDog/dd-trace-py","forks_url":"https://api.github.com/repos/DataDog/dd-trace-py/forks","keys_url":"https://api.github.com/repos/DataDog/dd-trace-py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/dd-trace-py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/dd-trace-py/teams","hooks_url":"https://api.github.com/repos/DataDog/dd-trace-py/hooks","issue_events_url":"https://api.github.com/repos/DataDog/dd-trace-py/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/dd-trace-py/events","assignees_url":"https://api.github.com/repos/DataDog/dd-trace-py/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/dd-trace-py/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/dd-trace-py/tags","blobs_url":"https://api.github.com/repos/DataDog/dd-trace-py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/dd-trace-py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/dd-trace-py/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/dd-trace-py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/dd-trace-py/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/dd-trace-py/languages","stargazers_url":"https://api.github.com/repos/DataDog/dd-trace-py/stargazers","contributors_url":"https://api.github.com/repos/DataDog/dd-trace-py/contributors","subscribers_url":"https://api.github.com/repos/DataDog/dd-trace-py/subscribers","subscription_url":"https://api.github.com/repos/DataDog/dd-trace-py/subscription","commits_url":"https://api.github.com/repos/DataDog/dd-trace-py/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/dd-trace-py/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/dd-trace-py/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/dd-trace-py/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/dd-trace-py/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/dd-trace-py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/dd-trace-py/merges","archive_url":"https://api.github.com/repos/DataDog/dd-trace-py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/dd-trace-py/downloads","issues_url":"https://api.github.com/repos/DataDog/dd-trace-py/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/dd-trace-py/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/dd-trace-py/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/dd-trace-py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/dd-trace-py/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/dd-trace-py/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/dd-trace-py/deployments","created_at":"2016-06-20T18:52:23Z","updated_at":"2017-09-20T09:23:24Z","pushed_at":"2017-10-11T08:28:47Z","git_url":"git://github.com/DataDog/dd-trace-py.git","ssh_url":"git@github.com:DataDog/dd-trace-py.git","clone_url":"https://github.com/DataDog/dd-trace-py.git","svn_url":"https://github.com/DataDog/dd-trace-py","homepage":"http://pypi.datadoghq.com/trace/docs/","size":1435,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":47,"forks":40,"open_issues":47,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354"},"html":{"href":"https://github.com/DataDog/dd-trace-py/pull/354"},"issue":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/issues/354"},"comments":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/issues/354/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/pulls/354/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/dd-trace-py/statuses/d20ac60ad564e7ff1aa8ef5eda05f446e5bb347d"}},"author_association":"NONE"}}
{"actor":{"display_login":"palazzem"}}