You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by agresch <gi...@git.apache.org> on 2018/04/10 13:27:45 UTC
[GitHub] storm pull request #2628: STORM-2908 Document Metrics V2 for 2.0.0
GitHub user agresch opened a pull request:
https://github.com/apache/storm/pull/2628
STORM-2908 Document Metrics V2 for 2.0.0
@ptgoetz @HeartSaVioR
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/agresch/storm agresch_metrics_docs
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/2628.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2628
----
commit 5878df9cc6441699fd48093b1ff9598ea48219f7
Author: Aaron Gresch <ag...@...>
Date: 2018-04-10T13:26:41Z
STORM-2908 Document Metrics V2 for 2.0.0
----
---
[GitHub] storm issue #2628: STORM-2908 Document Metrics V2 for 2.0.0
Posted by agresch <gi...@git.apache.org>.
Github user agresch commented on the issue:
https://github.com/apache/storm/pull/2628
@HeartSaVioR fixed. Will open new PR for 1.2 branch.
---
[GitHub] storm pull request #2628: STORM-2908 Document Metrics V2 for 2.0.0
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/2628#discussion_r180614324
--- Diff: docs/metrics_v2.md ---
@@ -0,0 +1,149 @@
+---
+title: Metrics Reporting API v2
+layout: documentation
+documentation: true
+---
+Apache Storm version 1.2 introduced a new metrics system for reporting
+internal statistics (e.g. acked, failed, emitted, transferred, disruptor queue metrics, etc.) as well as a
+new API for user defined metrics.
+
+The new metrics system is based on [Dropwizard Metrics](http://metrics.dropwizard.io).
+
+
+## User Defined Metrics
+To allow users to define custom metrics, the following methods have been added to the `TopologyContext`
+class, an instance of which is passed to spout's `open()` method and bolt's `prepare()` method:
+
+ public Timer registerTimer(String name)
+
+ public Histogram registerHistogram(String name)
+
+ public Meter registerMeter(String name)
+
+ public Counter registerCounter(String name)
+
+ public Gauge registerGauge(String name, Gauge gauge)
+
+API documentation: [Timer](http://metrics.dropwizard.io/4.0.0/apidocs/com/codahale/metrics/Timer.html),
+[Histogram](http://metrics.dropwizard.io/4.0.0/apidocs/com/codahale/metrics/Histogram.html),
+[Meter](http://metrics.dropwizard.io/4.0.0/apidocs/com/codahale/metrics/Meter.html),
+[Counter](http://metrics.dropwizard.io/4.0.0/apidocs/com/codahale/metrics/Counter.html),
+[Guage](http://metrics.dropwizard.io/4.0.0/apidocs/com/codahale/metrics/Gauge.html)
--- End diff --
nit: Guage -> Gauge. Missed spot while reviewing 1.x doc. Could you also please raise a patch for 1.x version too?
---
[GitHub] storm pull request #2628: STORM-2908 Document Metrics V2 for 2.0.0
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/storm/pull/2628
---
[GitHub] storm issue #2628: STORM-2908 Document Metrics V2 for 2.0.0
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:
https://github.com/apache/storm/pull/2628
+1
---