{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-microgateway/pulls/comments/200142519","pull_request_review_id":134399740,"id":200142519,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDE0MjUxOQ==","diff_hunk":"@@ -28,34 +28,27 @@ public type AnalyticsRequestFilter object {\n             context.attributes[HOSTNAME_PROPERTY] = \"localhost\";\n         }\n         context.attributes[PROTOCOL_PROPERTY] = listener.protocol;\n-        boolean filterFailed = check <boolean>context.attributes[FILTER_FAILED];\n-        if (!filterFailed && context.attributes[IS_THROTTLE_OUT] == true) {\n-            if (context.attributes[ALLOWED_ON_QUOTA_REACHED] == true) {\n-                doFilterRequest(request, context);\n-            }\n-        } else {\n-            if (!filterFailed) {\n-                doFilterRequest(request, context);\n-            }\n-        }\n+        doFilterRequest(request, context);\n         return true;\n \n     }\n \n     public function filterResponse(http:Response response, http:FilterContext context) returns boolean {\n         boolean filterFailed = check <boolean>context.attributes[FILTER_FAILED];\n-        if (!filterFailed && context.attributes.hasKey(IS_THROTTLE_OUT)) {\n+        if (context.attributes.hasKey(IS_THROTTLE_OUT)) {\n             boolean isThrottleOut = check <boolean>context.attributes[IS_THROTTLE_OUT];\n             if (isThrottleOut) {\n                 ThrottleAnalyticsEventDTO eventDto = populateThrottleAnalyticdDTO(context);\n-                //todo: publish\n+                eventStream.publish(getEventFromThrottleData(eventDto));\n             } else {\n-                doFilterResponse(response, context);\n-                doFilterFault(context);\n+                if (!filterFailed ) {","path":"components/micro-gateway-core/src/main/ballerina/gateway/filters/analytics_request_filter.bal","position":31,"original_position":31,"commit_id":"8c38f675ef10e8b9aab10784148ef544526fc85e","original_commit_id":"8c38f675ef10e8b9aab10784148ef544526fc85e","user":{"login":"mushthaq33","id":15009816,"node_id":"MDQ6VXNlcjE1MDA5ODE2","avatar_url":"https://avatars0.githubusercontent.com/u/15009816?v=4","gravatar_id":"","url":"https://api.github.com/users/mushthaq33","html_url":"https://github.com/mushthaq33","followers_url":"https://api.github.com/users/mushthaq33/followers","following_url":"https://api.github.com/users/mushthaq33/following{/other_user}","gists_url":"https://api.github.com/users/mushthaq33/gists{/gist_id}","starred_url":"https://api.github.com/users/mushthaq33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushthaq33/subscriptions","organizations_url":"https://api.github.com/users/mushthaq33/orgs","repos_url":"https://api.github.com/users/mushthaq33/repos","events_url":"https://api.github.com/users/mushthaq33/events{/privacy}","received_events_url":"https://api.github.com/users/mushthaq33/received_events","type":"User","site_admin":false},"body":"small formatting issue","created_at":"2018-07-04T14:23:03Z","updated_at":"2018-07-04T14:23:03Z","html_url":"https://github.com/wso2/product-microgateway/pull/160#discussion_r200142519","pull_request_url":"https://api.github.com/repos/wso2/product-microgateway/pulls/160","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-microgateway/pulls/comments/200142519"},"html":{"href":"https://github.com/wso2/product-microgateway/pull/160#discussion_r200142519"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-microgateway/pulls/160"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-microgateway/pulls/160","id":199264015,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MjY0MDE1","html_url":"https://github.com/wso2/product-microgateway/pull/160","diff_url":"https://github.com/wso2/product-microgateway/pull/160.diff","patch_url":"https://github.com/wso2/product-microgateway/pull/160.patch","issue_url":"https://api.github.com/repos/wso2/product-microgateway/issues/160","number":160,"state":"open","locked":false,"title":"Fixing throttle data publishing","user":{"login":"dinusha92","id":8377610,"node_id":"MDQ6VXNlcjgzNzc2MTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8377610?v=4","gravatar_id":"","url":"https://api.github.com/users/dinusha92","html_url":"https://github.com/dinusha92","followers_url":"https://api.github.com/users/dinusha92/followers","following_url":"https://api.github.com/users/dinusha92/following{/other_user}","gists_url":"https://api.github.com/users/dinusha92/gists{/gist_id}","starred_url":"https://api.github.com/users/dinusha92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinusha92/subscriptions","organizations_url":"https://api.github.com/users/dinusha92/orgs","repos_url":"https://api.github.com/users/dinusha92/repos","events_url":"https://api.github.com/users/dinusha92/events{/privacy}","received_events_url":"https://api.github.com/users/dinusha92/received_events","type":"User","site_admin":false},"body":"## Purpose\r\nPublish throttle data to analytics using file system.\r\n\r\n## Goals\r\nGenerate throttle data and populate stream.\r\n","created_at":"2018-07-04T14:20:54Z","updated_at":"2018-07-04T14:23:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20ffde70bc025c3f8466003ba340b4da076ba213","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-microgateway/pulls/160/commits","review_comments_url":"https://api.github.com/repos/wso2/product-microgateway/pulls/160/comments","review_comment_url":"https://api.github.com/repos/wso2/product-microgateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-microgateway/issues/160/comments","statuses_url":"https://api.github.com/repos/wso2/product-microgateway/statuses/8c38f675ef10e8b9aab10784148ef544526fc85e","head":{"label":"dinusha92:master","ref":"master","sha":"8c38f675ef10e8b9aab10784148ef544526fc85e","user":{"login":"dinusha92","id":8377610,"node_id":"MDQ6VXNlcjgzNzc2MTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8377610?v=4","gravatar_id":"","url":"https://api.github.com/users/dinusha92","html_url":"https://github.com/dinusha92","followers_url":"https://api.github.com/users/dinusha92/followers","following_url":"https://api.github.com/users/dinusha92/following{/other_user}","gists_url":"https://api.github.com/users/dinusha92/gists{/gist_id}","starred_url":"https://api.github.com/users/dinusha92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinusha92/subscriptions","organizations_url":"https://api.github.com/users/dinusha92/orgs","repos_url":"https://api.github.com/users/dinusha92/repos","events_url":"https://api.github.com/users/dinusha92/events{/privacy}","received_events_url":"https://api.github.com/users/dinusha92/received_events","type":"User","site_admin":false},"repo":{"id":135110683,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUxMTA2ODM=","name":"product-microgateway","full_name":"dinusha92/product-microgateway","owner":{"login":"dinusha92","id":8377610,"node_id":"MDQ6VXNlcjgzNzc2MTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8377610?v=4","gravatar_id":"","url":"https://api.github.com/users/dinusha92","html_url":"https://github.com/dinusha92","followers_url":"https://api.github.com/users/dinusha92/followers","following_url":"https://api.github.com/users/dinusha92/following{/other_user}","gists_url":"https://api.github.com/users/dinusha92/gists{/gist_id}","starred_url":"https://api.github.com/users/dinusha92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinusha92/subscriptions","organizations_url":"https://api.github.com/users/dinusha92/orgs","repos_url":"https://api.github.com/users/dinusha92/repos","events_url":"https://api.github.com/users/dinusha92/events{/privacy}","received_events_url":"https://api.github.com/users/dinusha92/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dinusha92/product-microgateway","description":null,"fork":true,"url":"https://api.github.com/repos/dinusha92/product-microgateway","forks_url":"https://api.github.com/repos/dinusha92/product-microgateway/forks","keys_url":"https://api.github.com/repos/dinusha92/product-microgateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dinusha92/product-microgateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dinusha92/product-microgateway/teams","hooks_url":"https://api.github.com/repos/dinusha92/product-microgateway/hooks","issue_events_url":"https://api.github.com/repos/dinusha92/product-microgateway/issues/events{/number}","events_url":"https://api.github.com/repos/dinusha92/product-microgateway/events","assignees_url":"https://api.github.com/repos/dinusha92/product-microgateway/assignees{/user}","branches_url":"https://api.github.com/repos/dinusha92/product-microgateway/branches{/branch}","tags_url":"https://api.github.com/repos/dinusha92/product-microgateway/tags","blobs_url":"https://api.github.com/repos/dinusha92/product-microgateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dinusha92/product-microgateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dinusha92/product-microgateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/dinusha92/product-microgateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dinusha92/product-microgateway/statuses/{sha}","languages_url":"https://api.github.com/repos/dinusha92/product-microgateway/languages","stargazers_url":"https://api.github.com/repos/dinusha92/product-microgateway/stargazers","contributors_url":"https://api.github.com/repos/dinusha92/product-microgateway/contributors","subscribers_url":"https://api.github.com/repos/dinusha92/product-microgateway/subscribers","subscription_url":"https://api.github.com/repos/dinusha92/product-microgateway/subscription","commits_url":"https://api.github.com/repos/dinusha92/product-microgateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/dinusha92/product-microgateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/dinusha92/product-microgateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/dinusha92/product-microgateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/dinusha92/product-microgateway/contents/{+path}","compare_url":"https://api.github.com/repos/dinusha92/product-microgateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dinusha92/product-microgateway/merges","archive_url":"https://api.github.com/repos/dinusha92/product-microgateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dinusha92/product-microgateway/downloads","issues_url":"https://api.github.com/repos/dinusha92/product-microgateway/issues{/number}","pulls_url":"https://api.github.com/repos/dinusha92/product-microgateway/pulls{/number}","milestones_url":"https://api.github.com/repos/dinusha92/product-microgateway/milestones{/number}","notifications_url":"https://api.github.com/repos/dinusha92/product-microgateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dinusha92/product-microgateway/labels{/name}","releases_url":"https://api.github.com/repos/dinusha92/product-microgateway/releases{/id}","deployments_url":"https://api.github.com/repos/dinusha92/product-microgateway/deployments","created_at":"2018-05-28T04:49:52Z","updated_at":"2018-07-04T14:18:47Z","pushed_at":"2018-07-04T14:18:45Z","git_url":"git://github.com/dinusha92/product-microgateway.git","ssh_url":"git@github.com:dinusha92/product-microgateway.git","clone_url":"https://github.com/dinusha92/product-microgateway.git","svn_url":"https://github.com/dinusha92/product-microgateway","homepage":null,"size":1076,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"451ee3f63225cd7680cb80f806dfa5812313a278","user":{"login":"wso2","id":533043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":134538006,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ1MzgwMDY=","name":"product-microgateway","full_name":"wso2/product-microgateway","owner":{"login":"wso2","id":533043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/product-microgateway","description":null,"fork":false,"url":"https://api.github.com/repos/wso2/product-microgateway","forks_url":"https://api.github.com/repos/wso2/product-microgateway/forks","keys_url":"https://api.github.com/repos/wso2/product-microgateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-microgateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-microgateway/teams","hooks_url":"https://api.github.com/repos/wso2/product-microgateway/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-microgateway/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-microgateway/events","assignees_url":"https://api.github.com/repos/wso2/product-microgateway/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-microgateway/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-microgateway/tags","blobs_url":"https://api.github.com/repos/wso2/product-microgateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-microgateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-microgateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-microgateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-microgateway/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-microgateway/languages","stargazers_url":"https://api.github.com/repos/wso2/product-microgateway/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-microgateway/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-microgateway/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-microgateway/subscription","commits_url":"https://api.github.com/repos/wso2/product-microgateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-microgateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-microgateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-microgateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-microgateway/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-microgateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-microgateway/merges","archive_url":"https://api.github.com/repos/wso2/product-microgateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-microgateway/downloads","issues_url":"https://api.github.com/repos/wso2/product-microgateway/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-microgateway/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-microgateway/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-microgateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-microgateway/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-microgateway/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/product-microgateway/deployments","created_at":"2018-05-23T08:27:56Z","updated_at":"2018-07-04T14:01:37Z","pushed_at":"2018-07-04T14:20:55Z","git_url":"git://github.com/wso2/product-microgateway.git","ssh_url":"git@github.com:wso2/product-microgateway.git","clone_url":"https://github.com/wso2/product-microgateway.git","svn_url":"https://github.com/wso2/product-microgateway","homepage":null,"size":1154,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"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":14,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-microgateway/pulls/160"},"html":{"href":"https://github.com/wso2/product-microgateway/pull/160"},"issue":{"href":"https://api.github.com/repos/wso2/product-microgateway/issues/160"},"comments":{"href":"https://api.github.com/repos/wso2/product-microgateway/issues/160/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-microgateway/pulls/160/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-microgateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-microgateway/pulls/160/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-microgateway/statuses/8c38f675ef10e8b9aab10784148ef544526fc85e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mushthaq33"}}