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?


---

Reply via email to