{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/234061810","pull_request_review_id":175623696,"id":234061810,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDA2MTgxMA==","diff_hunk":"@@ -44,5 +51,67 @@ public static Sensor createTaskAndStoreLatencyAndThroughputSensors(final Sensor.\n         addInvocationRateAndCount(sensor, metricsGroup, storeTags, operation);\n         return sensor;\n     }\n+\n+    public static Sensor createBufferSizeSensor(final StateStore store,\n+                                                final InternalProcessorContext context) {\n+        return getBufferSizeOrCountSensor(store, context, \"size\");\n+    }\n+\n+    public static Sensor createBufferCountSensor(final StateStore store,\n+                                                 final InternalProcessorContext context) {\n+        return getBufferSizeOrCountSensor(store, context, \"count\");\n+    }\n+\n+    private static Sensor getBufferSizeOrCountSensor(final StateStore store,\n+                                                     final InternalProcessorContext context,\n+                                                     final String property) {\n+        final StreamsMetricsImpl metrics = context.metrics();\n+\n+        final String sensorName = \"suppression-buffer-\" + property;\n+\n+        final Sensor sensor = metrics.storeLevelSensor(\n+            context.taskId().toString(),\n+            store.name(),\n+            sensorName,\n+            Sensor.RecordingLevel.DEBUG\n+        );\n+\n+        final String metricsGroup = \"stream-buffer-metrics\";","path":"streams/src/main/java/org/apache/kafka/streams/state/internals/metrics/Sensors.java","position":53,"original_position":53,"commit_id":"9f20e022a93dd18acf2a8b27fa8f78aabbce6352","original_commit_id":"0cc5cc6f654e4213355d04f1b341d3d7631384d2","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":"I think it's good to be aware of this, but it seems like reporting the store name is the right thing to do here.\r\n\r\nNote that the buffer in this case *is* the store for the suppression processor. So, using the processor name instead of the full store name would be more analogous to doing the same thing for a K/V Store.\r\n\r\nAs written, the metrics that are specific to the buffer (aka store) will be tagged with a name that matches the name of that component when you describe the topology.\r\n\r\nDoes that seem right, or have I missed your point?","created_at":"2018-11-16T01:03:41Z","updated_at":"2018-11-16T01:03:41Z","html_url":"https://github.com/apache/kafka/pull/5795#discussion_r234061810","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/234061810"},"html":{"href":"https://github.com/apache/kafka/pull/5795#discussion_r234061810"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/5795"}},"in_reply_to_id":225680794},"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-16T01:03:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46931003a7c6b3bffd80c3f5df1d9f5c70e8a4db","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/9f20e022a93dd18acf2a8b27fa8f78aabbce6352","head":{"label":"vvcephei:suppress-buffer-metrics","ref":"suppress-buffer-metrics","sha":"9f20e022a93dd18acf2a8b27fa8f78aabbce6352","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-15T22:15:39Z","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":75624,"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":"d28c5348197256db09b59d1ebbfe7db9d3934f47","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-16T01:02:33Z","pushed_at":"2018-11-16T00:49:59Z","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":76301,"stargazers_count":10136,"watchers_count":10136,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5685,"mirror_url":null,"archived":false,"open_issues_count":529,"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":5685,"open_issues":529,"watchers":10136,"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/9f20e022a93dd18acf2a8b27fa8f78aabbce6352"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vvcephei"}}