{"action":"created","comment":{"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/comments/220063126","pull_request_review_id":158383203,"id":220063126,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDA2MzEyNg==","diff_hunk":"@@ -1,15 +1,59 @@\n+import * as net from 'net';\n import * as http from 'http';\n import * as https from 'https';\n+import * as url from 'url';\n import {URL} from './Constants';\n-import { RequestOptions, ClientRequest } from 'http';\n+\n+const httpAgent = new http.Agent({\n+    keepAlive: true,\n+});\n+const httpsAgent = new https.Agent({\n+    maxCachedSessions: 1,\n+    keepAlive: true,\n+});\n \n class Reporter {\n+\n     private reports: any[];\n     private apiKey: string;\n+    private useHttps: boolean;\n+    private requestOptions: http.RequestOptions;\n \n-    constructor(apiKey: string) {\n+    constructor(apiKey: string, u?: url.URL) {\n         this.reports = [];\n         this.apiKey = apiKey;\n+        this.useHttps = (u ? u.protocol : URL.protocol) === 'https:';\n+        this.requestOptions = this.createRequestOptions();\n+    }\n+\n+    getConfig(conf1: any, conf2: any): any {","path":"src/Reporter.ts","position":31,"original_position":31,"commit_id":"67846fa013d1fb08bf2de3044d889db3d9ac4c52","original_commit_id":"67846fa013d1fb08bf2de3044d889db3d9ac4c52","user":{"login":"kobalski","id":3218140,"node_id":"MDQ6VXNlcjMyMTgxNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/3218140?v=4","gravatar_id":"","url":"https://api.github.com/users/kobalski","html_url":"https://github.com/kobalski","followers_url":"https://api.github.com/users/kobalski/followers","following_url":"https://api.github.com/users/kobalski/following{/other_user}","gists_url":"https://api.github.com/users/kobalski/gists{/gist_id}","starred_url":"https://api.github.com/users/kobalski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobalski/subscriptions","organizations_url":"https://api.github.com/users/kobalski/orgs","repos_url":"https://api.github.com/users/kobalski/repos","events_url":"https://api.github.com/users/kobalski/events{/privacy}","received_events_url":"https://api.github.com/users/kobalski/received_events","type":"User","site_admin":false},"body":"Merging the pr now and will delete leftover code with another pr.","created_at":"2018-09-25T05:38:11Z","updated_at":"2018-09-25T05:38:11Z","html_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs/pull/29#discussion_r220063126","pull_request_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/comments/220063126"},"html":{"href":"https://github.com/thundra-io/thundra-lambda-agent-nodejs/pull/29#discussion_r220063126"},"pull_request":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29"}},"in_reply_to_id":219734516},"pull_request":{"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29","id":217471369,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NDcxMzY5","html_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs/pull/29","diff_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs/pull/29.diff","patch_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs/pull/29.patch","issue_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/29","number":29,"state":"open","locked":false,"title":" Enabled \"keep-alive\" and \"no-delay\" flags for connections to be reused","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":"","created_at":"2018-09-22T18:26:05Z","updated_at":"2018-09-25T05:38:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84a7f1a7b536f3f6fc4f3fbc4b365ab26aeeafa2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29/commits","review_comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29/comments","review_comment_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/29/comments","statuses_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/statuses/67846fa013d1fb08bf2de3044d889db3d9ac4c52","head":{"label":"thundra-io:improvement/connection-reuse","ref":"improvement/connection-reuse","sha":"67846fa013d1fb08bf2de3044d889db3d9ac4c52","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":121881215,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE4ODEyMTU=","name":"thundra-lambda-agent-nodejs","full_name":"thundra-io/thundra-lambda-agent-nodejs","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-nodejs","description":"Thundra Lambda Node.js Agent","fork":false,"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs","forks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/forks","keys_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/teams","hooks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/hooks","issue_events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/events","assignees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/tags","blobs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/languages","stargazers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/stargazers","contributors_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/contributors","subscribers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/subscribers","subscription_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/subscription","commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/merges","archive_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/downloads","issues_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/deployments","created_at":"2018-02-17T18:31:09Z","updated_at":"2018-09-24T05:51:28Z","pushed_at":"2018-09-24T11:26:25Z","git_url":"git://github.com/thundra-io/thundra-lambda-agent-nodejs.git","ssh_url":"git@github.com:thundra-io/thundra-lambda-agent-nodejs.git","clone_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs.git","svn_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs","homepage":null,"size":373,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","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":3,"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":3,"watchers":6,"default_branch":"master"}},"base":{"label":"thundra-io:master","ref":"master","sha":"a917bdd172e3939ad706d88dde862866a922f08e","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":121881215,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE4ODEyMTU=","name":"thundra-lambda-agent-nodejs","full_name":"thundra-io/thundra-lambda-agent-nodejs","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-nodejs","description":"Thundra Lambda Node.js Agent","fork":false,"url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs","forks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/forks","keys_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/teams","hooks_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/hooks","issue_events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/events","assignees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/tags","blobs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/languages","stargazers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/stargazers","contributors_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/contributors","subscribers_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/subscribers","subscription_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/subscription","commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/merges","archive_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/downloads","issues_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/deployments","created_at":"2018-02-17T18:31:09Z","updated_at":"2018-09-24T05:51:28Z","pushed_at":"2018-09-24T11:26:25Z","git_url":"git://github.com/thundra-io/thundra-lambda-agent-nodejs.git","ssh_url":"git@github.com:thundra-io/thundra-lambda-agent-nodejs.git","clone_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs.git","svn_url":"https://github.com/thundra-io/thundra-lambda-agent-nodejs","homepage":null,"size":373,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","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":3,"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":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29"},"html":{"href":"https://github.com/thundra-io/thundra-lambda-agent-nodejs/pull/29"},"issue":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/29"},"comments":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/thundra-io/thundra-lambda-agent-nodejs/statuses/67846fa013d1fb08bf2de3044d889db3d9ac4c52"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kobalski"}}