{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/comments/83278560","pull_request_review_id":4133308,"id":83278560,"diff_hunk":"@@ -0,0 +1,117 @@\n+---\n+layout: fluo-doc\n+title: Fluo Metrics\n+version:  1.0.0-incubating\n+---\n+\n+A Fluo application can be configured (in [fluo.properties]) to report metrics. When metrics are\n+configured, Fluo will report some 'default' metrics about an application that help users monitor its\n+performance. Users can also write code to report 'application-specific' metrics from their\n+applications. Both 'application-specific' and 'default' metrics share the same reporter configured\n+by [fluo.properties] and are described in detail below.\n+\n+## Configuring reporters\n+\n+Fluo metrics are not published by default. To publish metrics, configure a reporter in the 'metrics'\n+section of [fluo.properties]. There are several different reporter types (i.e Console, CSV,\n+Graphite, JMX, SLF4J) that are implemented using [Dropwizard]. The choice of which reporter to use\n+depends on the visualization tool used. If you are not currently using a visualization tool, there\n+is [documentation][grafana] for reporting Fluo metrics to Grafana/InfluxDB.\n+\n+## Metrics names\n+\n+When Fluo metrics are reported, they are published using a naming scheme that encodes additional\n+information. This additional information is represented using all caps variables (i.e `METRIC`)\n+below.\n+\n+Default metrics start with `fluo.class` or `fluo.system` and have following naming schemes:\n+\n+        fluo.class.APPLICATION.REPORTER_ID.METRIC.CLASS\n+        fluo.system.APPLICATION.REPORTER_ID.METRIC\n+\n+Application metrics start with `fluo.app` and have following scheme:\n+\n+        fluo.app.REPORTER_ID.METRIC\n+\n+The variables below describe the additional information that is encoded in metrics names.\n+\n+1. `APPLICATION` - Fluo application name\n+2. `REPORTER_ID` - Unique ID of the Fluo oracle, worker, or client that is reporting the metric.\n+    When running in YARN, this ID is of the format `worker-INSTANCE_ID` or `oracle-INSTANCE_ID`\n+    where `INSTANCE_ID` corresponds to instance number. When not running in YARN, this ID consists\n+    of a hostname and a base36 long that is unique across all fluo processes.\n+3. `METRIC` - Name of the metric. For 'default' metrics, this is set by Fluo. For 'application'\n+    metrics, this is set by user. Name should be unique and avoid using period '.' in name.\n+4. `CLASS` - Name of Fluo observer or loader class that produced metric. This allows things like\n+    transaction collisions to be tracked per class.\n+\n+## Application-specific metrics\n+\n+Application metrics are implemented by retrieving a [MetricsReporter] from an [Observer], [Loader],\n+or [FluoClient].  These metrics are named using the format `fluo.app.REPORTER_ID.METRIC`.\n+\n+## Default metrics\n+\n+Default metrics report for a particular Observer/Loader class or system-wide.\n+\n+Below are metrics that are reported from each Observer/Loader class that is configured in a Fluo\n+application. These metrics are reported after each transaction and named using the format\n+`fluo.class.APPLICATION.REPORTER_ID.METRIC.CLASS`.\n+\n+* tx_lock_wait_time - [Timer]\n+    - Time transaction spent waiting on locks held by other transactions.\n+    - Only updated for transactions that have non-zero lock time.\n+* tx_execution_time - [Timer]\n+    - Time transaction took to execute.\n+    - Updated for failed and successful transactions.\n+    - This does not include commit time, only the time from start until commit is called.\n+* tx_with_collision - [Meter]\n+    - Rate of transactions with collisions.\n+* tx_collisions - [Meter]\n+    - Rate of collisions.\n+* tx_entries_set - [Meter]\n+    - Rate of row/columns set by transaction\n+* tx_entries_read - [Meter]\n+    - Rate of row/columns read by transaction that existed.\n+    - There is currently no count of all reads (including non-existent data)\n+* tx_locks_timedout - [Meter]\n+    - Rate of timedout locks rolled back by transaction.\n+    - These are locks that are held for very long periods by another transaction that appears to be\n+      alive based on zookeeper.\n+* tx_locks_dead - [Meter]\n+    - Rate of dead locks rolled by a transaction.\n+    - These are locks held by a process that appears to be dead according to zookeeper.\n+* tx_status_`<STATUS>` - [Meter]\n+    - Rate of different ways (i.e `<STATUS>`) a transaction can terminate\n+\n+Below are system-wide metrics that are reported for the entire Fluo application. These metrics are\n+named using the format `fluo.system.APPLICATION.REPORTER_ID.METRIC`.\n+\n+* oracle_response_time - [Timer]\n+    - Time each RPC call to oracle for stamps took\n+* oracle_client_stamps - [Histogram]\n+    - Number of stamps requested for each request for stamps to the server\n+* oracle_server_stamps - [Histogram]\n+    - Number of stamps requested for each request for stamps from a client\n+* worker_notifications_queued - [Gauge]\n+    - The current number of notifications queued for processing.\n+* transactor_committing - [Gauge]\n+    - The current number of transactions that are working their way through the commit steps.\n+\n+Histograms and Timers have a counter. In the case of a histogram, the counter is the number of times\n+the metric was updated and not a sum of the updates. For example if a request for 5 timestamps was\n+made to the oracle followed by a request for 3 timestamps, then the count for `oracle_server_stamps`\n+would be 2 and the mean would be (5+3)/2.\n+\n+[fluo.properties]: https://github.com/apache/fluo/blob/1.0.0-incubating/modules/distribution/src/main/config/fluo.properties","path":"docs/fluo/1.0.0-incubating/metrics.md","position":null,"original_position":106,"commit_id":"5efc6e1e3e729c3ca65a63d9a8df0f68ec2d8e0d","original_commit_id":"e8f3156875fa9136cb21033e5166aeffd8e09905","user":{"login":"mikewalch","id":730698,"avatar_url":"https://avatars.githubusercontent.com/u/730698?v=3","gravatar_id":"","url":"https://api.github.com/users/mikewalch","html_url":"https://github.com/mikewalch","followers_url":"https://api.github.com/users/mikewalch/followers","following_url":"https://api.github.com/users/mikewalch/following{/other_user}","gists_url":"https://api.github.com/users/mikewalch/gists{/gist_id}","starred_url":"https://api.github.com/users/mikewalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikewalch/subscriptions","organizations_url":"https://api.github.com/users/mikewalch/orgs","repos_url":"https://api.github.com/users/mikewalch/repos","events_url":"https://api.github.com/users/mikewalch/events{/privacy}","received_events_url":"https://api.github.com/users/mikewalch/received_events","type":"User","site_admin":false},"body":"Was fixed","created_at":"2016-10-13T18:15:12Z","updated_at":"2016-10-13T18:15:12Z","html_url":"https://github.com/apache/incubator-fluo-website/pull/23#discussion_r83278560","pull_request_url":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/comments/83278560"},"html":{"href":"https://github.com/apache/incubator-fluo-website/pull/23#discussion_r83278560"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23","id":89055220,"html_url":"https://github.com/apache/incubator-fluo-website/pull/23","diff_url":"https://github.com/apache/incubator-fluo-website/pull/23.diff","patch_url":"https://github.com/apache/incubator-fluo-website/pull/23.patch","issue_url":"https://api.github.com/repos/apache/incubator-fluo-website/issues/23","number":23,"state":"open","locked":false,"title":"Fluo 1.0.0","user":{"login":"mikewalch","id":730698,"avatar_url":"https://avatars.githubusercontent.com/u/730698?v=3","gravatar_id":"","url":"https://api.github.com/users/mikewalch","html_url":"https://github.com/mikewalch","followers_url":"https://api.github.com/users/mikewalch/followers","following_url":"https://api.github.com/users/mikewalch/following{/other_user}","gists_url":"https://api.github.com/users/mikewalch/gists{/gist_id}","starred_url":"https://api.github.com/users/mikewalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikewalch/subscriptions","organizations_url":"https://api.github.com/users/mikewalch/orgs","repos_url":"https://api.github.com/users/mikewalch/repos","events_url":"https://api.github.com/users/mikewalch/events{/privacy}","received_events_url":"https://api.github.com/users/mikewalch/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-12T17:07:34Z","updated_at":"2016-10-13T18:15:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b1a041c67c30f5326c834fdd121016326841407","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-fluo-website/issues/23/comments","statuses_url":"https://api.github.com/repos/apache/incubator-fluo-website/statuses/5efc6e1e3e729c3ca65a63d9a8df0f68ec2d8e0d","head":{"label":"mikewalch:fluo-1.0.0","ref":"fluo-1.0.0","sha":"5efc6e1e3e729c3ca65a63d9a8df0f68ec2d8e0d","user":{"login":"mikewalch","id":730698,"avatar_url":"https://avatars.githubusercontent.com/u/730698?v=3","gravatar_id":"","url":"https://api.github.com/users/mikewalch","html_url":"https://github.com/mikewalch","followers_url":"https://api.github.com/users/mikewalch/followers","following_url":"https://api.github.com/users/mikewalch/following{/other_user}","gists_url":"https://api.github.com/users/mikewalch/gists{/gist_id}","starred_url":"https://api.github.com/users/mikewalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikewalch/subscriptions","organizations_url":"https://api.github.com/users/mikewalch/orgs","repos_url":"https://api.github.com/users/mikewalch/repos","events_url":"https://api.github.com/users/mikewalch/events{/privacy}","received_events_url":"https://api.github.com/users/mikewalch/received_events","type":"User","site_admin":false},"repo":{"id":62064100,"name":"incubator-fluo-website","full_name":"mikewalch/incubator-fluo-website","owner":{"login":"mikewalch","id":730698,"avatar_url":"https://avatars.githubusercontent.com/u/730698?v=3","gravatar_id":"","url":"https://api.github.com/users/mikewalch","html_url":"https://github.com/mikewalch","followers_url":"https://api.github.com/users/mikewalch/followers","following_url":"https://api.github.com/users/mikewalch/following{/other_user}","gists_url":"https://api.github.com/users/mikewalch/gists{/gist_id}","starred_url":"https://api.github.com/users/mikewalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikewalch/subscriptions","organizations_url":"https://api.github.com/users/mikewalch/orgs","repos_url":"https://api.github.com/users/mikewalch/repos","events_url":"https://api.github.com/users/mikewalch/events{/privacy}","received_events_url":"https://api.github.com/users/mikewalch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikewalch/incubator-fluo-website","description":"Mirror of Apache Fluo Website (Incubator)","fork":true,"url":"https://api.github.com/repos/mikewalch/incubator-fluo-website","forks_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/forks","keys_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/teams","hooks_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/hooks","issue_events_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/issues/events{/number}","events_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/events","assignees_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/assignees{/user}","branches_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/branches{/branch}","tags_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/tags","blobs_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/statuses/{sha}","languages_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/languages","stargazers_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/stargazers","contributors_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/contributors","subscribers_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/subscribers","subscription_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/subscription","commits_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/contents/{+path}","compare_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/merges","archive_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/downloads","issues_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/issues{/number}","pulls_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/pulls{/number}","milestones_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/milestones{/number}","notifications_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/labels{/name}","releases_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/releases{/id}","deployments_url":"https://api.github.com/repos/mikewalch/incubator-fluo-website/deployments","created_at":"2016-06-27T14:52:52Z","updated_at":"2016-06-27T14:52:57Z","pushed_at":"2016-10-13T18:14:43Z","git_url":"git://github.com/mikewalch/incubator-fluo-website.git","ssh_url":"git@github.com:mikewalch/incubator-fluo-website.git","clone_url":"https://github.com/mikewalch/incubator-fluo-website.git","svn_url":"https://github.com/mikewalch/incubator-fluo-website","homepage":null,"size":3339,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"apache:gh-pages","ref":"gh-pages","sha":"6ea52c65d2b3d29eb1d7eb18d15c93a26e689065","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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":61863697,"name":"incubator-fluo-website","full_name":"apache/incubator-fluo-website","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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},"private":false,"html_url":"https://github.com/apache/incubator-fluo-website","description":"Mirror of Apache Fluo Website (Incubator)","fork":false,"url":"https://api.github.com/repos/apache/incubator-fluo-website","forks_url":"https://api.github.com/repos/apache/incubator-fluo-website/forks","keys_url":"https://api.github.com/repos/apache/incubator-fluo-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-fluo-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-fluo-website/teams","hooks_url":"https://api.github.com/repos/apache/incubator-fluo-website/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-fluo-website/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-fluo-website/events","assignees_url":"https://api.github.com/repos/apache/incubator-fluo-website/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-fluo-website/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-fluo-website/tags","blobs_url":"https://api.github.com/repos/apache/incubator-fluo-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-fluo-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-fluo-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-fluo-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-fluo-website/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-fluo-website/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-fluo-website/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-fluo-website/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-fluo-website/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-fluo-website/subscription","commits_url":"https://api.github.com/repos/apache/incubator-fluo-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-fluo-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-fluo-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-fluo-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-fluo-website/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-fluo-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-fluo-website/merges","archive_url":"https://api.github.com/repos/apache/incubator-fluo-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-fluo-website/downloads","issues_url":"https://api.github.com/repos/apache/incubator-fluo-website/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-fluo-website/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-fluo-website/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-fluo-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-fluo-website/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-fluo-website/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-fluo-website/deployments","created_at":"2016-06-24T07:00:05Z","updated_at":"2016-07-07T15:32:00Z","pushed_at":"2016-10-13T18:14:44Z","git_url":"git://github.com/apache/incubator-fluo-website.git","ssh_url":"git@github.com:apache/incubator-fluo-website.git","clone_url":"https://github.com/apache/incubator-fluo-website.git","svn_url":"https://github.com/apache/incubator-fluo-website","homepage":null,"size":3230,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":"git://git.apache.org/incubator-fluo-website.git","open_issues_count":9,"forks":4,"open_issues":9,"watchers":1,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23"},"html":{"href":"https://github.com/apache/incubator-fluo-website/pull/23"},"issue":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/issues/23"},"comments":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-fluo-website/statuses/5efc6e1e3e729c3ca65a63d9a8df0f68ec2d8e0d"}}}}
{"actor":{"display_login":"mikewalch"}}