{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/235500171","pull_request_review_id":177381096,"id":235500171,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTUwMDE3MQ==","diff_hunk":"@@ -20,12 +20,19 @@\n import org.apache.kafka.common.metrics.Sensor;\n import org.apache.kafka.common.metrics.stats.Avg;\n import org.apache.kafka.common.metrics.stats.Max;\n+import org.apache.kafka.common.metrics.stats.Rate;\n+import org.apache.kafka.common.metrics.stats.Sum;\n+import org.apache.kafka.common.metrics.stats.Total;\n import org.apache.kafka.streams.processor.internals.InternalProcessorContext;\n import org.apache.kafka.streams.processor.internals.metrics.StreamsMetricsImpl;\n \n import java.util.Map;\n+import java.util.concurrent.TimeUnit;\n \n public class Sensors {\n+\n+    private static final String PROCESSOR_NODE_METRICS_GROUP = \"stream-processor-node-metrics\";","path":"streams/src/main/java/org/apache/kafka/streams/kstream/internals/metrics/Sensors.java","position":15,"original_position":15,"commit_id":"fa4e8586933e49e9a3c8ca8f3ecad87a3dd2ed69","original_commit_id":"00ba183efe54c5fe80d07c084a8d5123d1dcbd82","user":{"login":"guozhangwang","id":10729597,"node_id":"MDQ6VXNlcjEwNzI5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/10729597?v=4","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"body":"To clarify: there are two entities: the metrics registry which organizes the metrics, and there is metrics reporter which regularly pulls from the registry to report the metric values. \r\n\r\nInside metrics registry there is `sensor` which as you understand is just a way of grouping metrics into meaningful clusters. The `SensorName` is just an id for distinguishing sensors in the metrics registry (i.e. you will see logic like `if this sensor as already been created in the registry skip this step). A metric name presented in `MetricName` which contains groupName, tags, etc is just a logical entity in the registry. How to represent the metric names is up to the metrics reporter (different reporters can definitely represent it differently). As for the sensor names, they should never be seen outside the registry as the metrics reporter never exposed them.\r\n\r\n","created_at":"2018-11-21T18:38:05Z","updated_at":"2018-11-21T18:38:05Z","html_url":"https://github.com/apache/kafka/pull/5795#discussion_r235500171","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/5795","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/235500171"},"html":{"href":"https://github.com/apache/kafka/pull/5795#discussion_r235500171"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/5795"}},"in_reply_to_id":224918131},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/5795","id":222576779,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNTc2Nzc5","html_url":"https://github.com/apache/kafka/pull/5795","diff_url":"https://github.com/apache/kafka/pull/5795.diff","patch_url":"https://github.com/apache/kafka/pull/5795.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/5795","number":5795,"state":"open","locked":false,"title":"KAFKA-7223: Suppression Buffer Metrics","user":{"login":"vvcephei","id":832787,"node_id":"MDQ6VXNlcjgzMjc4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/832787?v=4","gravatar_id":"","url":"https://api.github.com/users/vvcephei","html_url":"https://github.com/vvcephei","followers_url":"https://api.github.com/users/vvcephei/followers","following_url":"https://api.github.com/users/vvcephei/following{/other_user}","gists_url":"https://api.github.com/users/vvcephei/gists{/gist_id}","starred_url":"https://api.github.com/users/vvcephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvcephei/subscriptions","organizations_url":"https://api.github.com/users/vvcephei/orgs","repos_url":"https://api.github.com/users/vvcephei/repos","events_url":"https://api.github.com/users/vvcephei/events{/privacy}","received_events_url":"https://api.github.com/users/vvcephei/received_events","type":"User","site_admin":false},"body":"Add the final batch of metrics from KIP-328\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2018-10-12T20:23:40Z","updated_at":"2018-11-21T18:38:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5617bc61549c70a73e36bbac964f1dd38ef77ed9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/5795/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/5795/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/5795/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/fa4e8586933e49e9a3c8ca8f3ecad87a3dd2ed69","head":{"label":"vvcephei:suppress-buffer-metrics","ref":"suppress-buffer-metrics","sha":"fa4e8586933e49e9a3c8ca8f3ecad87a3dd2ed69","user":{"login":"vvcephei","id":832787,"node_id":"MDQ6VXNlcjgzMjc4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/832787?v=4","gravatar_id":"","url":"https://api.github.com/users/vvcephei","html_url":"https://github.com/vvcephei","followers_url":"https://api.github.com/users/vvcephei/followers","following_url":"https://api.github.com/users/vvcephei/following{/other_user}","gists_url":"https://api.github.com/users/vvcephei/gists{/gist_id}","starred_url":"https://api.github.com/users/vvcephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvcephei/subscriptions","organizations_url":"https://api.github.com/users/vvcephei/orgs","repos_url":"https://api.github.com/users/vvcephei/repos","events_url":"https://api.github.com/users/vvcephei/events{/privacy}","received_events_url":"https://api.github.com/users/vvcephei/received_events","type":"User","site_admin":false},"repo":{"id":124139257,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQxMzkyNTc=","name":"kafka","full_name":"vvcephei/kafka","private":false,"owner":{"login":"vvcephei","id":832787,"node_id":"MDQ6VXNlcjgzMjc4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/832787?v=4","gravatar_id":"","url":"https://api.github.com/users/vvcephei","html_url":"https://github.com/vvcephei","followers_url":"https://api.github.com/users/vvcephei/followers","following_url":"https://api.github.com/users/vvcephei/following{/other_user}","gists_url":"https://api.github.com/users/vvcephei/gists{/gist_id}","starred_url":"https://api.github.com/users/vvcephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvcephei/subscriptions","organizations_url":"https://api.github.com/users/vvcephei/orgs","repos_url":"https://api.github.com/users/vvcephei/repos","events_url":"https://api.github.com/users/vvcephei/events{/privacy}","received_events_url":"https://api.github.com/users/vvcephei/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vvcephei/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/vvcephei/kafka","forks_url":"https://api.github.com/repos/vvcephei/kafka/forks","keys_url":"https://api.github.com/repos/vvcephei/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vvcephei/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vvcephei/kafka/teams","hooks_url":"https://api.github.com/repos/vvcephei/kafka/hooks","issue_events_url":"https://api.github.com/repos/vvcephei/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/vvcephei/kafka/events","assignees_url":"https://api.github.com/repos/vvcephei/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/vvcephei/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/vvcephei/kafka/tags","blobs_url":"https://api.github.com/repos/vvcephei/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vvcephei/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vvcephei/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/vvcephei/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vvcephei/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/vvcephei/kafka/languages","stargazers_url":"https://api.github.com/repos/vvcephei/kafka/stargazers","contributors_url":"https://api.github.com/repos/vvcephei/kafka/contributors","subscribers_url":"https://api.github.com/repos/vvcephei/kafka/subscribers","subscription_url":"https://api.github.com/repos/vvcephei/kafka/subscription","commits_url":"https://api.github.com/repos/vvcephei/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/vvcephei/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/vvcephei/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/vvcephei/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/vvcephei/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/vvcephei/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vvcephei/kafka/merges","archive_url":"https://api.github.com/repos/vvcephei/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vvcephei/kafka/downloads","issues_url":"https://api.github.com/repos/vvcephei/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/vvcephei/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/vvcephei/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/vvcephei/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vvcephei/kafka/labels{/name}","releases_url":"https://api.github.com/repos/vvcephei/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/vvcephei/kafka/deployments","created_at":"2018-03-06T21:12:33Z","updated_at":"2018-04-05T14:43:40Z","pushed_at":"2018-11-21T01:24:44Z","git_url":"git://github.com/vvcephei/kafka.git","ssh_url":"git@github.com:vvcephei/kafka.git","clone_url":"https://github.com/vvcephei/kafka.git","svn_url":"https://github.com/vvcephei/kafka","homepage":null,"size":76235,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"23ed45a21df3717332cbd2e284e9867ef5c2cc51","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"node_id":"MDEwOlJlcG9zaXRvcnkyMjExMjQz","name":"kafka","full_name":"apache/kafka","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2018-11-21T17:50:20Z","pushed_at":"2018-11-21T18:35:42Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":76456,"stargazers_count":10218,"watchers_count":10218,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5716,"mirror_url":null,"archived":false,"open_issues_count":533,"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":5716,"open_issues":533,"watchers":10218,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/5795"},"html":{"href":"https://github.com/apache/kafka/pull/5795"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/5795"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/5795/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/5795/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/5795/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/fa4e8586933e49e9a3c8ca8f3ecad87a3dd2ed69"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"guozhangwang"}}