📈 Sum represents a scalar metric calculated as a sum of all reported measurements.
Sums are perfect for counters and cumulative values. They can be monotonic (only increasing) or non-monotonic (can increase or decrease).
const requestsSum: Sum = { dataPoints: [ { attributes: [ { key: "method", value: { stringValue: "GET" } }, { key: "status", value: { stringValue: "200" } } ], startTimeUnixNano: "1640995200000000000", timeUnixNano: "1640995260000000000", asInt: 1542, exemplars: [], flags: 0 } ], aggregationTemporality: AggregationTemporality.CUMULATIVE, isMonotonic: true}; Copy
const requestsSum: Sum = { dataPoints: [ { attributes: [ { key: "method", value: { stringValue: "GET" } }, { key: "status", value: { stringValue: "200" } } ], startTimeUnixNano: "1640995200000000000", timeUnixNano: "1640995260000000000", asInt: 1542, exemplars: [], flags: 0 } ], aggregationTemporality: AggregationTemporality.CUMULATIVE, isMonotonic: true};
How the aggregation is performed over time
Array of data points for this sum
Whether this sum only increases (true for counters)
📈 Sum represents a scalar metric calculated as a sum of all reported measurements.
Sums are perfect for counters and cumulative values. They can be monotonic (only increasing) or non-monotonic (can increase or decrease).
Example