Dimension Hierarchy
A DimensionHierarchy is an ordered list of Dimensions over which aggregations are computed and rollup computations are performed. For example, if you want to compute minute-wise, hourly and daily aggregations, you would add them to the API model in that order. Each dimension defined in the hierarchy has an implicit level; starting with zero for the first dimension in the hierarchy increasing by one as you traverse the ordered hierarchy.
A set of measurements or metrics to be computed for each of these levels are defined for the hierarchy. The API has methods to:
- Exclude certain metrics to be computed at specific levels, or
- Not compute measurements completely at a specific level.
By default, all metrics associated with the hierarchy are computed at all levels.
<cube> <hierarchy name="ByService"> <properties> <property name="storage-schema" value="ByService"/> </properties> <dimensions> <dimension ref="service_name" compute="false"/> <dimension ref="application_name" compute="false"/> <dimension ref="environment" compute="false"/> <dimension ref="node" compute="false"/> <dimension ref="host" compute="false"/> <dimension ref="service_type" compute="false"/> <dimension ref="weeks"/> <dimension ref="days"/> <dimension ref="hours"/> <dimension ref="minutes"/> </dimensions> <measurement-refs> <measurement ref="HitCount"/> <measurement ref="SuccessCount"/> <measurement ref="FaultCount"/> <measurement ref="AvgResponseTime"/> <measurement ref="TP5ResponseTime"/> <measurement ref="TP95ResponseTime"/> </measurement-refs> </hierarchy> </hierarchies> </cube>
The dimension mentioned in the <dimension-ref> should be a part of the dimensions defined in the schema.
In the Dimension element, the value in the compute attribute indicates whether or not metrics are computed for a dimension. By default, this value is set to true. If set to false, the computation is not propagated upwards and it stops at the dimension where compute is set to false.
The measurement mentioned in the <measurement-ref> should be a part of the measurements defined in the schema.
The table gives attributes and their equivalent API for the hierarchy element: