Reference Guide

Table Of Contents
component or application can then iterate through the Collection, calling the following
MetricService method for each TimeStampedMetric.
Metric Registration API:
public interface MetricService {
public void registerMetric(TimeStampedMetric toRegister);
}
This will re-register the existing TimeStampedMetric reference with the metering framework.
Depending upon how long the bounce took there may be a gap in the resulting data on disk for
TimeStampedMetrics that are to be persisted. It is also possible, depending on the type of
TimeStampedMetric, that the value produced by the first interval summary following the bounce is
affected by the bounce. For example, since TimeStampedRollingCounters take the delta of the last
value reported and the previous value reported, there could be a spike in value that span the
entire time of the bounce in the first value persisted for a TimeStampedRollingCounter.
Time Series Data
As noted for the preceding northbound REST API for data retrieval, time series values returned from
the REST API for TimeStampedMetrics may be returned in "raw" form or may be further
summarized to span specified time intervals. In "raw" form TimeStampedMetric values will be
returned at the finest granularity possible; if the values for the TimeStampedMetric specified were
summarized and persisted every minute then "raw" data will be returned such that each value
spans a one-minute interval, and if the values for a particular Metric were summarized and
persisted every five minutes then "raw" data will be returned such that each value spans a five-
minute interval. If time series data is requested for a TimeStampedMetric at a granularity that is
finer than that with which the TimeStampedMetric values were persisted, for example data is
requested at one-minute intervals for a TimeStampedMetric whose values were persisted every
fifteen minutes, an error will be returned to alert to the user that their request cannot be fulfilled.
It is important to note that while the persisted time series data for a given corresponding
TimeStampedMetric is computed from values that the TimeStampedMetric is updated with, the
resulting persisted data will typically not have the same form as the values that the
TimeStampedMetric is updated with. For example, consider the case of the
TimeStampedRollingCounter metric type; while TimeStampedRollingCounters are updated with 64-
bit rolling counter values, the only value persisted for such a metric is the delta between two such
64-bit values (the 64-bit values themselves are not persisted). Generally speaking, the value
persisted for a TimeStampedMetric is the change in its value since the last time the
TimeStampedMetric's value was persisted. This approach focuses the resulting data on what each
TimeStampedMetric was measuring during a persistence interval, rather than the mechanics used
to convey the measurements.
Returned Data
The content returned for each data point, whether "raw" or summarized, differs somewhat
depending upon the type of TimeStampedMetric the data resulted from. For "raw" data this
content is essentially just a JSON representation of the data persisted for each data point being
retrieved. For summarized data values that are computed from "raw" values, the content takes the
same form as that of a "raw" data point except that the values represent the combination of all
"raw" data points from the summarized interval. The content provided for each data point includes
the following.
53