{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/comments/60968772","id":60968772,"diff_hunk":"@@ -6,35 +6,44 @@\n local l = require \"lpeg\"\n l.locale(l)\n local tonumber = tonumber\n+local ip = require \"ip_address\"\n \n local M = {}\n setfenv(1, M) -- Remove external access to contain everything in the module\n \n+local pct_encoded   = l.P\"%\" * l.xdigit * l.xdigit\n+local unreserved    = l.alnum + l.S\"-._~\"\n+local sub_delims    = l.S\"!$&'()*+,;=\"\n+\n local space         = l.space^1\n local sep           = l.P\"\\n\"\n local sql_end       = l.P\";\" * (l.P\"\\n\" + -1)\n local line          = (l.P(1) - sep)^0 * sep\n-local float         = l.digit^1 * \".\" * l.digit^1\n+local float         = l.digit^1 * \".\" * l.digit^1 / tonumber\n+local integer       = l.P\"-\"^-1 * l.digit^1 / tonumber\n+local host          = l.Ct(l.Cg(ip.v4, \"value\") * l.Cg(l.Cc\"ipv4\", \"representation\"))\n+                    + l.Ct(l.Cg(ip.v6, \"value\") * l.Cg(l.Cc\"ipv6\", \"representation\"))\n+                    + l.Ct(l.Cg((unreserved + pct_encoded + sub_delims)^1, \"value\") * l.Cg(l.Cc\"hostname\", \"representation\"))\n \n local time          = l.P\"# Time: \" * line\n \n local user_legal    = (1 - l.S\"[]\")\n local host_legal    = (l.alnum + l.S\".-\")\n-local user_name     = user_legal^1 * \"[\" * l.Cg(user_legal^1, \"Username\") * \"]\"\n-local host_name     = host_legal^0 * l.space^0 * \"[\" * l.Cg((l.P(1) - \"]\")^1, \"Hostname\") * \"]\"\n+local user_name     = user_legal^0 * \"[\" * l.Cg(user_legal^0, \"Username\") * \"]\"\n+local host_name     = l.Cg(host, \"Client_hostname\")^0 * l.space^0 * \"[\" * l.Cg(host, \"Client_address\")^0 * \"]\"","path":"modules/mysql.lua","position":31,"original_position":31,"commit_id":"8a3f72c3d826bbf1afba69c4c92a14b8ddb230be","original_commit_id":"8a3f72c3d826bbf1afba69c4c92a14b8ddb230be","user":{"login":"trink","id":795988,"avatar_url":"https://avatars.githubusercontent.com/u/795988?v=3","gravatar_id":"","url":"https://api.github.com/users/trink","html_url":"https://github.com/trink","followers_url":"https://api.github.com/users/trink/followers","following_url":"https://api.github.com/users/trink/following{/other_user}","gists_url":"https://api.github.com/users/trink/gists{/gist_id}","starred_url":"https://api.github.com/users/trink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trink/subscriptions","organizations_url":"https://api.github.com/users/trink/orgs","repos_url":"https://api.github.com/users/trink/repos","events_url":"https://api.github.com/users/trink/events{/privacy}","received_events_url":"https://api.github.com/users/trink/received_events","type":"User","site_admin":false},"body":"Changing the data schema Hostname->Client_address could break downstream consumers (the Hostname will now be the name of the parsing machine)","created_at":"2016-04-25T19:01:01Z","updated_at":"2016-04-25T19:01:01Z","html_url":"https://github.com/mozilla-services/lua_sandbox/pull/128#discussion_r60968772","pull_request_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/comments/60968772"},"html":{"href":"https://github.com/mozilla-services/lua_sandbox/pull/128#discussion_r60968772"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128","id":66774817,"html_url":"https://github.com/mozilla-services/lua_sandbox/pull/128","diff_url":"https://github.com/mozilla-services/lua_sandbox/pull/128.diff","patch_url":"https://github.com/mozilla-services/lua_sandbox/pull/128.patch","issue_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/issues/128","number":128,"state":"open","locked":false,"title":"Adding Percona support","user":{"login":"robison","id":3833252,"avatar_url":"https://avatars.githubusercontent.com/u/3833252?v=3","gravatar_id":"","url":"https://api.github.com/users/robison","html_url":"https://github.com/robison","followers_url":"https://api.github.com/users/robison/followers","following_url":"https://api.github.com/users/robison/following{/other_user}","gists_url":"https://api.github.com/users/robison/gists{/gist_id}","starred_url":"https://api.github.com/users/robison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robison/subscriptions","organizations_url":"https://api.github.com/users/robison/orgs","repos_url":"https://api.github.com/users/robison/repos","events_url":"https://api.github.com/users/robison/events{/privacy}","received_events_url":"https://api.github.com/users/robison/received_events","type":"User","site_admin":false},"body":"I've taken the liberty of adding Percona support to the `mysql` module, based on the documentation found at https://www.percona.com/doc/percona-server/5.6/diagnostics/slow_extended.html. I've tested it against a number of cases in our environment and it seems to work well, while not impacting the existing functionality.","created_at":"2016-04-17T17:33:33Z","updated_at":"2016-04-25T19:01:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b20fb682b9df0ed6b0238c79c5fc8045722c2b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/issues/128/comments","statuses_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/statuses/8a3f72c3d826bbf1afba69c4c92a14b8ddb230be","head":{"label":"robison:master","ref":"master","sha":"8a3f72c3d826bbf1afba69c4c92a14b8ddb230be","user":{"login":"robison","id":3833252,"avatar_url":"https://avatars.githubusercontent.com/u/3833252?v=3","gravatar_id":"","url":"https://api.github.com/users/robison","html_url":"https://github.com/robison","followers_url":"https://api.github.com/users/robison/followers","following_url":"https://api.github.com/users/robison/following{/other_user}","gists_url":"https://api.github.com/users/robison/gists{/gist_id}","starred_url":"https://api.github.com/users/robison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robison/subscriptions","organizations_url":"https://api.github.com/users/robison/orgs","repos_url":"https://api.github.com/users/robison/repos","events_url":"https://api.github.com/users/robison/events{/privacy}","received_events_url":"https://api.github.com/users/robison/received_events","type":"User","site_admin":false},"repo":{"id":56449299,"name":"lua_sandbox","full_name":"robison/lua_sandbox","owner":{"login":"robison","id":3833252,"avatar_url":"https://avatars.githubusercontent.com/u/3833252?v=3","gravatar_id":"","url":"https://api.github.com/users/robison","html_url":"https://github.com/robison","followers_url":"https://api.github.com/users/robison/followers","following_url":"https://api.github.com/users/robison/following{/other_user}","gists_url":"https://api.github.com/users/robison/gists{/gist_id}","starred_url":"https://api.github.com/users/robison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robison/subscriptions","organizations_url":"https://api.github.com/users/robison/orgs","repos_url":"https://api.github.com/users/robison/repos","events_url":"https://api.github.com/users/robison/events{/privacy}","received_events_url":"https://api.github.com/users/robison/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robison/lua_sandbox","description":"Generic Lua sandbox for dynamic data analysis","fork":true,"url":"https://api.github.com/repos/robison/lua_sandbox","forks_url":"https://api.github.com/repos/robison/lua_sandbox/forks","keys_url":"https://api.github.com/repos/robison/lua_sandbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robison/lua_sandbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robison/lua_sandbox/teams","hooks_url":"https://api.github.com/repos/robison/lua_sandbox/hooks","issue_events_url":"https://api.github.com/repos/robison/lua_sandbox/issues/events{/number}","events_url":"https://api.github.com/repos/robison/lua_sandbox/events","assignees_url":"https://api.github.com/repos/robison/lua_sandbox/assignees{/user}","branches_url":"https://api.github.com/repos/robison/lua_sandbox/branches{/branch}","tags_url":"https://api.github.com/repos/robison/lua_sandbox/tags","blobs_url":"https://api.github.com/repos/robison/lua_sandbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robison/lua_sandbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robison/lua_sandbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/robison/lua_sandbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robison/lua_sandbox/statuses/{sha}","languages_url":"https://api.github.com/repos/robison/lua_sandbox/languages","stargazers_url":"https://api.github.com/repos/robison/lua_sandbox/stargazers","contributors_url":"https://api.github.com/repos/robison/lua_sandbox/contributors","subscribers_url":"https://api.github.com/repos/robison/lua_sandbox/subscribers","subscription_url":"https://api.github.com/repos/robison/lua_sandbox/subscription","commits_url":"https://api.github.com/repos/robison/lua_sandbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/robison/lua_sandbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/robison/lua_sandbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/robison/lua_sandbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/robison/lua_sandbox/contents/{+path}","compare_url":"https://api.github.com/repos/robison/lua_sandbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robison/lua_sandbox/merges","archive_url":"https://api.github.com/repos/robison/lua_sandbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robison/lua_sandbox/downloads","issues_url":"https://api.github.com/repos/robison/lua_sandbox/issues{/number}","pulls_url":"https://api.github.com/repos/robison/lua_sandbox/pulls{/number}","milestones_url":"https://api.github.com/repos/robison/lua_sandbox/milestones{/number}","notifications_url":"https://api.github.com/repos/robison/lua_sandbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robison/lua_sandbox/labels{/name}","releases_url":"https://api.github.com/repos/robison/lua_sandbox/releases{/id}","deployments_url":"https://api.github.com/repos/robison/lua_sandbox/deployments","created_at":"2016-04-17T17:29:15Z","updated_at":"2016-04-17T17:29:16Z","pushed_at":"2016-04-20T17:14:49Z","git_url":"git://github.com/robison/lua_sandbox.git","ssh_url":"git@github.com:robison/lua_sandbox.git","clone_url":"https://github.com/robison/lua_sandbox.git","svn_url":"https://github.com/robison/lua_sandbox","homepage":"","size":1026,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"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":"mozilla-services:master","ref":"master","sha":"e2213d02170419748cef0cfc0545746c8e4b4a01","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":14175255,"name":"lua_sandbox","full_name":"mozilla-services/lua_sandbox","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/lua_sandbox","description":"Generic Lua sandbox for dynamic data analysis","fork":false,"url":"https://api.github.com/repos/mozilla-services/lua_sandbox","forks_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/forks","keys_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/teams","hooks_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/events","assignees_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/tags","blobs_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/subscription","commits_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/merges","archive_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/downloads","issues_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-services/lua_sandbox/deployments","created_at":"2013-11-06T14:45:55Z","updated_at":"2016-04-23T12:39:15Z","pushed_at":"2016-04-20T17:14:50Z","git_url":"git://github.com/mozilla-services/lua_sandbox.git","ssh_url":"git@github.com:mozilla-services/lua_sandbox.git","clone_url":"https://github.com/mozilla-services/lua_sandbox.git","svn_url":"https://github.com/mozilla-services/lua_sandbox","homepage":"","size":1048,"stargazers_count":69,"watchers_count":69,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":9,"forks":40,"open_issues":9,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128"},"html":{"href":"https://github.com/mozilla-services/lua_sandbox/pull/128"},"issue":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/issues/128"},"comments":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/lua_sandbox/statuses/8a3f72c3d826bbf1afba69c4c92a14b8ddb230be"}}}}