#960 statsmanager: helper functions for obtaining common metadata of metrics

Reporter Jonas Wielicki
Owner MattJ
Created
Updated
Stars ★ (1)
Tags
  • Status-Accepted
  • Milestone-0.12
  • Priority-Medium
  • Type-Enhancement
  1. Jonas Wielicki on

    The following metadata is common for all statsmanager metrics and should be easily available: 1. unit of measure (e.g. bytes, seconds, number of events ("total")) 2. plugin/module which declared the metric 3. host to which the metric belongs (possibly nil) 4. name of the metric 5. type of the metric (counter, gauge, …) Currently, some of that can extracted from the metric name, for other information one needs to access the extras table. I propose that host, module and type are also moved to the extras table and the metric name is cleaned up so that it really consists only of the name. If that is not possible (e.g. because the name is used as a key internally), I propose to have the original metric name, host, module and type *also* in the extras so that pattern matching on the metric name is not needed to extract that information.

  2. MattJ on

    Although it's not imminent on my todo list, I do intend to revamp the metrics API at some point, and will take these issues into account. Thanks!

    Changes
    • tags Milestone-0.12 Status-Accepted
    • owner MattJ
  3. Jonas Wielicki on

    Will you also take https://issues.prosody.im/959 into account?

New comment

Not published. Used for spam prevention and optional update notifications.