{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/comments/38203923","id":38203923,"diff_hunk":"@@ -696,6 +766,78 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) {\n \t\t}\n \t}\n \n+\tif *perfEventsStatements {\n+\t\tperfQuery := fmt.Sprintf(\"%s LIMIT %s\", perfSchemaEventsStatementsQuery, strconv.Itoa(*perfEventsStatementsLimit))","path":"mysqld_exporter.go","position":96,"original_position":96,"commit_id":"aaf24aafdbde1af6ca98ff255a9845082d4cf900","original_commit_id":"aaf24aafdbde1af6ca98ff255a9845082d4cf900","user":{"login":"fabxc","id":4948210,"avatar_url":"https://avatars.githubusercontent.com/u/4948210?v=3","gravatar_id":"","url":"https://api.github.com/users/fabxc","html_url":"https://github.com/fabxc","followers_url":"https://api.github.com/users/fabxc/followers","following_url":"https://api.github.com/users/fabxc/following{/other_user}","gists_url":"https://api.github.com/users/fabxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fabxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabxc/subscriptions","organizations_url":"https://api.github.com/users/fabxc/orgs","repos_url":"https://api.github.com/users/fabxc/repos","events_url":"https://api.github.com/users/fabxc/events{/privacy}","received_events_url":"https://api.github.com/users/fabxc/received_events","type":"User","site_admin":false},"body":"Ah, I thought about adding a `%d` into the `perfSchemaEventsStatementsQuery` but this works just as well.\r\nYou can replace the second `%s` with `%d` and remove the call to `strconv.Itoa`.","created_at":"2015-08-28T14:18:06Z","updated_at":"2015-08-28T14:18:06Z","html_url":"https://github.com/prometheus/mysqld_exporter/pull/19#discussion_r38203923","pull_request_url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/comments/38203923"},"html":{"href":"https://github.com/prometheus/mysqld_exporter/pull/19#discussion_r38203923"},"pull_request":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19","id":43184305,"html_url":"https://github.com/prometheus/mysqld_exporter/pull/19","diff_url":"https://github.com/prometheus/mysqld_exporter/pull/19.diff","patch_url":"https://github.com/prometheus/mysqld_exporter/pull/19.patch","issue_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/19","number":19,"state":"open","locked":false,"title":"Add metrics for events statements by digest","user":{"login":"SuperQ","id":1320667,"avatar_url":"https://avatars.githubusercontent.com/u/1320667?v=3","gravatar_id":"","url":"https://api.github.com/users/SuperQ","html_url":"https://github.com/SuperQ","followers_url":"https://api.github.com/users/SuperQ/followers","following_url":"https://api.github.com/users/SuperQ/following{/other_user}","gists_url":"https://api.github.com/users/SuperQ/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperQ/subscriptions","organizations_url":"https://api.github.com/users/SuperQ/orgs","repos_url":"https://api.github.com/users/SuperQ/repos","events_url":"https://api.github.com/users/SuperQ/events{/privacy}","received_events_url":"https://api.github.com/users/SuperQ/received_events","type":"User","site_admin":false},"body":"Read metrics from performance_schema.events_statements_summary_by_digest\r\n* Limit to the top digests by count (default to 250)\r\n* Disabled by default becuase it can produce a large number of metrics","created_at":"2015-08-24T15:00:51Z","updated_at":"2015-08-28T14:18:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"575f6e9788b070260f806afebf3b83c6c1310ace","assignee":null,"milestone":{"url":"https://api.github.com/repos/prometheus/mysqld_exporter/milestones/1","html_url":"https://github.com/prometheus/mysqld_exporter/milestones/1.0","labels_url":"https://api.github.com/repos/prometheus/mysqld_exporter/milestones/1/labels","id":1269296,"number":1,"title":"1.0","description":null,"creator":{"login":"SuperQ","id":1320667,"avatar_url":"https://avatars.githubusercontent.com/u/1320667?v=3","gravatar_id":"","url":"https://api.github.com/users/SuperQ","html_url":"https://github.com/SuperQ","followers_url":"https://api.github.com/users/SuperQ/followers","following_url":"https://api.github.com/users/SuperQ/following{/other_user}","gists_url":"https://api.github.com/users/SuperQ/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperQ/subscriptions","organizations_url":"https://api.github.com/users/SuperQ/orgs","repos_url":"https://api.github.com/users/SuperQ/repos","events_url":"https://api.github.com/users/SuperQ/events{/privacy}","received_events_url":"https://api.github.com/users/SuperQ/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":9,"state":"open","created_at":"2015-08-24T12:48:48Z","updated_at":"2015-08-28T12:30:35Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19/commits","review_comments_url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19/comments","review_comment_url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/19/comments","statuses_url":"https://api.github.com/repos/prometheus/mysqld_exporter/statuses/aaf24aafdbde1af6ca98ff255a9845082d4cf900","head":{"label":"prometheus:bjk/events_statements","ref":"bjk/events_statements","sha":"aaf24aafdbde1af6ca98ff255a9845082d4cf900","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":32075541,"name":"mysqld_exporter","full_name":"prometheus/mysqld_exporter","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/mysqld_exporter","description":"Exporter for MySQL server metrics","fork":false,"url":"https://api.github.com/repos/prometheus/mysqld_exporter","forks_url":"https://api.github.com/repos/prometheus/mysqld_exporter/forks","keys_url":"https://api.github.com/repos/prometheus/mysqld_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/mysqld_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/mysqld_exporter/teams","hooks_url":"https://api.github.com/repos/prometheus/mysqld_exporter/hooks","issue_events_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/mysqld_exporter/events","assignees_url":"https://api.github.com/repos/prometheus/mysqld_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/mysqld_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/mysqld_exporter/tags","blobs_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/mysqld_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/mysqld_exporter/languages","stargazers_url":"https://api.github.com/repos/prometheus/mysqld_exporter/stargazers","contributors_url":"https://api.github.com/repos/prometheus/mysqld_exporter/contributors","subscribers_url":"https://api.github.com/repos/prometheus/mysqld_exporter/subscribers","subscription_url":"https://api.github.com/repos/prometheus/mysqld_exporter/subscription","commits_url":"https://api.github.com/repos/prometheus/mysqld_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/mysqld_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/mysqld_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/mysqld_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/mysqld_exporter/merges","archive_url":"https://api.github.com/repos/prometheus/mysqld_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/mysqld_exporter/downloads","issues_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/mysqld_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/mysqld_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/mysqld_exporter/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/mysqld_exporter/releases{/id}","created_at":"2015-03-12T12:23:48Z","updated_at":"2015-08-27T15:51:41Z","pushed_at":"2015-08-28T13:49:32Z","git_url":"git://github.com/prometheus/mysqld_exporter.git","ssh_url":"git@github.com:prometheus/mysqld_exporter.git","clone_url":"https://github.com/prometheus/mysqld_exporter.git","svn_url":"https://github.com/prometheus/mysqld_exporter","homepage":"http://prometheus.io/","size":532,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":11,"default_branch":"master"}},"base":{"label":"prometheus:master","ref":"master","sha":"1e6ccfc43c0ee7b7df1c3e7e47e782a17fb46e70","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":32075541,"name":"mysqld_exporter","full_name":"prometheus/mysqld_exporter","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/mysqld_exporter","description":"Exporter for MySQL server metrics","fork":false,"url":"https://api.github.com/repos/prometheus/mysqld_exporter","forks_url":"https://api.github.com/repos/prometheus/mysqld_exporter/forks","keys_url":"https://api.github.com/repos/prometheus/mysqld_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/mysqld_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/mysqld_exporter/teams","hooks_url":"https://api.github.com/repos/prometheus/mysqld_exporter/hooks","issue_events_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/mysqld_exporter/events","assignees_url":"https://api.github.com/repos/prometheus/mysqld_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/mysqld_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/mysqld_exporter/tags","blobs_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/mysqld_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/mysqld_exporter/languages","stargazers_url":"https://api.github.com/repos/prometheus/mysqld_exporter/stargazers","contributors_url":"https://api.github.com/repos/prometheus/mysqld_exporter/contributors","subscribers_url":"https://api.github.com/repos/prometheus/mysqld_exporter/subscribers","subscription_url":"https://api.github.com/repos/prometheus/mysqld_exporter/subscription","commits_url":"https://api.github.com/repos/prometheus/mysqld_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/mysqld_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/mysqld_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/mysqld_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/mysqld_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/mysqld_exporter/merges","archive_url":"https://api.github.com/repos/prometheus/mysqld_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/mysqld_exporter/downloads","issues_url":"https://api.github.com/repos/prometheus/mysqld_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/mysqld_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/mysqld_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/mysqld_exporter/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/mysqld_exporter/releases{/id}","created_at":"2015-03-12T12:23:48Z","updated_at":"2015-08-27T15:51:41Z","pushed_at":"2015-08-28T13:49:32Z","git_url":"git://github.com/prometheus/mysqld_exporter.git","ssh_url":"git@github.com:prometheus/mysqld_exporter.git","clone_url":"https://github.com/prometheus/mysqld_exporter.git","svn_url":"https://github.com/prometheus/mysqld_exporter","homepage":"http://prometheus.io/","size":532,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19"},"html":{"href":"https://github.com/prometheus/mysqld_exporter/pull/19"},"issue":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/19"},"comments":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/mysqld_exporter/statuses/aaf24aafdbde1af6ca98ff255a9845082d4cf900"}}}}