Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Different metrics of the same kind use different units. For example, buckets in tx.nodeSystemTimeHistogram use milliseconds, while cache.<cacheName>.GetTime  –   uses nanoseconds for some reason.

When setting up a monitoring infrastructure, users need this information, since it makes a big difference whether the metric uses milliseconds or nanoseconds, bytes or number of packets. Monitoring tools could use this information to scale the measurements properly, converting bytes into megabytes, milliseconds into minutes, etc. There is no source of this information currently, so setting up a monitoring dashboard required searching through the source code of Ignite.

Description

MetricUnit class should be introduced. It should be possible to acquire the following instances:

  • NUMBER – number of times something happened or number of elements. No specific units are assigned to this value.
    Example: io.dataregion.PagesReplaced 
  • NANOSECONDS, MILLISECONDS, SECONDS – for time periods.
    Example: tx.totalNodeSystemTime 
  • TIMESTAMP – for specific moment in time.
    Example: cache.RebalanceStartTime 
  • BYTES, KILOBYTES, MEGABYTES – for amount of data.
    Example: cache.TotalRebalancedBytes 
  • PERCENT – fraction.
    Example: sys.CpuLoad 

It should also be possible to represent units like "bytes per second" and "number of times per second". A method MetricUnit.per(...)  should be implemented that will create an instance of a new MetricUnit corresponding to the ratio.

Example metrics: io.dataregion.PagesReplaceRate, cache.RebalancingBytesRate// Provide the design of the solution.


Risks and Assumptions

// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.

...