Skip to content

better support for aggregation of counters #344

@woodsaj

Description

@woodsaj

trying to aggregate counters is problematic. Users regularly have applications that emit counters, eg for number of requests handled, and want to aggregate these across many instances. When viewing the data users usually convert the aggregated metric to a rate via graphites perSecond() function.

The problem with aggregating the counters, is that if a single datapoint is missed from one instance the resulting counter value is much lower then expected. If the next interval has points from all instances then the aggregated counter value suddenly jumps. This leads to large drops and spikes when converting the aggregated counter to a rate.

In general, it is not recommended to aggregated counters. Instead the counters should be converted to rates first then aggregated.

Crng supports converting to rates but does not support chained aggregations (eg, convert to rate then sum).

Supporting chained aggregations will like require significant code changes, so instead i propose that we just add new functions for

  • sumRate
  • avgRate
  • minRate
  • maxRate

which convert metrics to rates then aggregate using the specified method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions