4 Replies Latest reply on Jun 13, 2014 8:04 AM by pilhuhn

    Metric types

    heiko.braun

      I saw that support for counters has recently been added. Can somebody explain the use of counters?

        • 1. Re: Metric types
          heiko.braun

          how are counters different from regular, instantaneous measurements of a value?

          • 2. Re: Metric types
            mithomps

            From a client API perspective its an atomic 'increment' (or 'decrement') operation that requires one call from the client instead of a two calls 1) read current value and 2) update the value.

            Backend implementations of this can provide optimizations of counter operations over "normal" measurement of values. For instance, Cassandra has a counter type: http://www.datastax.com/dev/blog/whats-new-in-cassandra-2-1-a-better-implementation-of-counters

            • 3. Re: Metric types
              mithomps

              The use case is the typical "Web Page Hit Counters" that you see on pages. Making that easy for users to setup with something like:

                   Api.increment("myWebsite.checkoutPage")

              • 4. Re: Metric types
                pilhuhn

                So a counter has no notion of "over time" or timestamp?

                 

                StatsD counters seem to be bucketized by the second and then the "real backend" - e.g. Graphite - is averaging this further over a minute.

                See http://statsd.readthedocs.org/en/latest/types.html#counters

                I think this bucketizing could make sense for use cases of what RHQ calls "Call time data" - counters with

                 

                key=value of  url.http-status = <count>

                e.g.

                jboss.org/rhq.200=5000

                jboss.org/rhq.404=0

                 

                StatsD seems to use the so called timers for this and autocomputes percentiles from them

                 

                I think StatsD Gauges are what we use as "normal data" so far and no automatic averaging or so is done.

                 

                Yammer Metics also has some basic types and then derivatives:

                Gauges, Counters, Histograms, Meters, and Timers

                with Gauges apparently like StatsD, Counters like ours and Histograms similar to StatsD Sets (?)

                 

                Does anyone know about other systems and their metric types ?