{"action":"created","comment":{"url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/comments/151854264","pull_request_review_id":77632750,"id":151854264,"diff_hunk":"@@ -1,21 +1,41 @@\n require 'net/http'\n require 'yaml'\n+require 'json'\n \n class JSONTransformer\n   def initialize\n     @config = File.exists?(\"/opt/nginx_dogstats.yaml\") ? YAML.load_file(\"/opt/nginx_dogstats.yaml\") : {}\n     @gce_zone = self.resolve_gce_zone\n+    @aws_region = self.resolve_aws_region\n   end\n \n+  # https://cloud.google.com/compute/docs/storing-retrieving-metadata#querying\n   def resolve_gce_zone\n     uri = URI(\"http://metadata.google.internal/computeMetadata/v1/instance/zone\")\n     req = Net::HTTP::Get.new(uri)\n     req['Metadata-Flavor'] = 'Google'\n     begin\n-      resp =  Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(req) }\n+      resp = Net::HTTP.start(uri.hostname, uri.port, open_timeout: 1, read_timeout: 1) { |http|","path":"datadog-transformer.rb","position":19,"original_position":19,"commit_id":"ddc99eed3dde45fde0d2d3c8a234b7d6df3247a2","original_commit_id":"ddc99eed3dde45fde0d2d3c8a234b7d6df3247a2","user":{"login":"softprops","id":2242,"avatar_url":"https://avatars3.githubusercontent.com/u/2242?v=4","gravatar_id":"","url":"https://api.github.com/users/softprops","html_url":"https://github.com/softprops","followers_url":"https://api.github.com/users/softprops/followers","following_url":"https://api.github.com/users/softprops/following{/other_user}","gists_url":"https://api.github.com/users/softprops/gists{/gist_id}","starred_url":"https://api.github.com/users/softprops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softprops/subscriptions","organizations_url":"https://api.github.com/users/softprops/orgs","repos_url":"https://api.github.com/users/softprops/repos","events_url":"https://api.github.com/users/softprops/events{/privacy}","received_events_url":"https://api.github.com/users/softprops/received_events","type":"User","site_admin":false},"body":"open and read timeouts both default to 60 seconds in ruby std lib. this optimizes for cases where this wouldn't resolve","created_at":"2017-11-19T04:01:20Z","updated_at":"2017-11-19T04:01:20Z","html_url":"https://github.com/meetup/k8s-nginx-dogstats/pull/7#discussion_r151854264","pull_request_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/comments/151854264"},"html":{"href":"https://github.com/meetup/k8s-nginx-dogstats/pull/7#discussion_r151854264"},"pull_request":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7","id":153479924,"html_url":"https://github.com/meetup/k8s-nginx-dogstats/pull/7","diff_url":"https://github.com/meetup/k8s-nginx-dogstats/pull/7.diff","patch_url":"https://github.com/meetup/k8s-nginx-dogstats/pull/7.patch","issue_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/7","number":7,"state":"open","locked":false,"title":"add aws_region, and cloud provider","user":{"login":"softprops","id":2242,"avatar_url":"https://avatars3.githubusercontent.com/u/2242?v=4","gravatar_id":"","url":"https://api.github.com/users/softprops","html_url":"https://github.com/softprops","followers_url":"https://api.github.com/users/softprops/followers","following_url":"https://api.github.com/users/softprops/following{/other_user}","gists_url":"https://api.github.com/users/softprops/gists{/gist_id}","starred_url":"https://api.github.com/users/softprops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softprops/subscriptions","organizations_url":"https://api.github.com/users/softprops/orgs","repos_url":"https://api.github.com/users/softprops/repos","events_url":"https://api.github.com/users/softprops/events{/privacy}","received_events_url":"https://api.github.com/users/softprops/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-19T03:59:12Z","updated_at":"2017-11-19T04:01:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6b8fade2281016f55e37594efc98b57aac4c1f4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7/commits","review_comments_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7/comments","review_comment_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/7/comments","statuses_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/statuses/ddc99eed3dde45fde0d2d3c8a234b7d6df3247a2","head":{"label":"meetup:aws_provider_compat","ref":"aws_provider_compat","sha":"ddc99eed3dde45fde0d2d3c8a234b7d6df3247a2","user":{"login":"meetup","id":147855,"avatar_url":"https://avatars0.githubusercontent.com/u/147855?v=4","gravatar_id":"","url":"https://api.github.com/users/meetup","html_url":"https://github.com/meetup","followers_url":"https://api.github.com/users/meetup/followers","following_url":"https://api.github.com/users/meetup/following{/other_user}","gists_url":"https://api.github.com/users/meetup/gists{/gist_id}","starred_url":"https://api.github.com/users/meetup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meetup/subscriptions","organizations_url":"https://api.github.com/users/meetup/orgs","repos_url":"https://api.github.com/users/meetup/repos","events_url":"https://api.github.com/users/meetup/events{/privacy}","received_events_url":"https://api.github.com/users/meetup/received_events","type":"Organization","site_admin":false},"repo":{"id":84008410,"name":"k8s-nginx-dogstats","full_name":"meetup/k8s-nginx-dogstats","owner":{"login":"meetup","id":147855,"avatar_url":"https://avatars0.githubusercontent.com/u/147855?v=4","gravatar_id":"","url":"https://api.github.com/users/meetup","html_url":"https://github.com/meetup","followers_url":"https://api.github.com/users/meetup/followers","following_url":"https://api.github.com/users/meetup/following{/other_user}","gists_url":"https://api.github.com/users/meetup/gists{/gist_id}","starred_url":"https://api.github.com/users/meetup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meetup/subscriptions","organizations_url":"https://api.github.com/users/meetup/orgs","repos_url":"https://api.github.com/users/meetup/repos","events_url":"https://api.github.com/users/meetup/events{/privacy}","received_events_url":"https://api.github.com/users/meetup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meetup/k8s-nginx-dogstats","description":"Nginx Dogstats metrics via Fluentd for Kubernetes","fork":false,"url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats","forks_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/forks","keys_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/teams","hooks_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/hooks","issue_events_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/events{/number}","events_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/events","assignees_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/assignees{/user}","branches_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/branches{/branch}","tags_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/tags","blobs_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/refs{/sha}","trees_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/statuses/{sha}","languages_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/languages","stargazers_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/stargazers","contributors_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/contributors","subscribers_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/subscribers","subscription_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/subscription","commits_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/commits{/sha}","git_commits_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/commits{/sha}","comments_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/comments{/number}","issue_comment_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/comments{/number}","contents_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/contents/{+path}","compare_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/merges","archive_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/downloads","issues_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues{/number}","pulls_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls{/number}","milestones_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/milestones{/number}","notifications_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/labels{/name}","releases_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/releases{/id}","deployments_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/deployments","created_at":"2017-03-05T22:54:04Z","updated_at":"2017-07-11T00:01:47Z","pushed_at":"2017-11-19T03:59:13Z","git_url":"git://github.com/meetup/k8s-nginx-dogstats.git","ssh_url":"git@github.com:meetup/k8s-nginx-dogstats.git","clone_url":"https://github.com/meetup/k8s-nginx-dogstats.git","svn_url":"https://github.com/meetup/k8s-nginx-dogstats","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"meetup:master","ref":"master","sha":"eb28ba788b3dca6cce4831f668b237c38053aa64","user":{"login":"meetup","id":147855,"avatar_url":"https://avatars0.githubusercontent.com/u/147855?v=4","gravatar_id":"","url":"https://api.github.com/users/meetup","html_url":"https://github.com/meetup","followers_url":"https://api.github.com/users/meetup/followers","following_url":"https://api.github.com/users/meetup/following{/other_user}","gists_url":"https://api.github.com/users/meetup/gists{/gist_id}","starred_url":"https://api.github.com/users/meetup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meetup/subscriptions","organizations_url":"https://api.github.com/users/meetup/orgs","repos_url":"https://api.github.com/users/meetup/repos","events_url":"https://api.github.com/users/meetup/events{/privacy}","received_events_url":"https://api.github.com/users/meetup/received_events","type":"Organization","site_admin":false},"repo":{"id":84008410,"name":"k8s-nginx-dogstats","full_name":"meetup/k8s-nginx-dogstats","owner":{"login":"meetup","id":147855,"avatar_url":"https://avatars0.githubusercontent.com/u/147855?v=4","gravatar_id":"","url":"https://api.github.com/users/meetup","html_url":"https://github.com/meetup","followers_url":"https://api.github.com/users/meetup/followers","following_url":"https://api.github.com/users/meetup/following{/other_user}","gists_url":"https://api.github.com/users/meetup/gists{/gist_id}","starred_url":"https://api.github.com/users/meetup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meetup/subscriptions","organizations_url":"https://api.github.com/users/meetup/orgs","repos_url":"https://api.github.com/users/meetup/repos","events_url":"https://api.github.com/users/meetup/events{/privacy}","received_events_url":"https://api.github.com/users/meetup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meetup/k8s-nginx-dogstats","description":"Nginx Dogstats metrics via Fluentd for Kubernetes","fork":false,"url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats","forks_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/forks","keys_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/teams","hooks_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/hooks","issue_events_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/events{/number}","events_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/events","assignees_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/assignees{/user}","branches_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/branches{/branch}","tags_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/tags","blobs_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/refs{/sha}","trees_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/statuses/{sha}","languages_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/languages","stargazers_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/stargazers","contributors_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/contributors","subscribers_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/subscribers","subscription_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/subscription","commits_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/commits{/sha}","git_commits_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/git/commits{/sha}","comments_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/comments{/number}","issue_comment_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/comments{/number}","contents_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/contents/{+path}","compare_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/merges","archive_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/downloads","issues_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues{/number}","pulls_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls{/number}","milestones_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/milestones{/number}","notifications_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/labels{/name}","releases_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/releases{/id}","deployments_url":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/deployments","created_at":"2017-03-05T22:54:04Z","updated_at":"2017-07-11T00:01:47Z","pushed_at":"2017-11-19T03:59:13Z","git_url":"git://github.com/meetup/k8s-nginx-dogstats.git","ssh_url":"git@github.com:meetup/k8s-nginx-dogstats.git","clone_url":"https://github.com/meetup/k8s-nginx-dogstats.git","svn_url":"https://github.com/meetup/k8s-nginx-dogstats","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7"},"html":{"href":"https://github.com/meetup/k8s-nginx-dogstats/pull/7"},"issue":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/7"},"comments":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/meetup/k8s-nginx-dogstats/statuses/ddc99eed3dde45fde0d2d3c8a234b7d6df3247a2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"softprops"}}