Reference documentation and code samples for the Stackdriver Monitoring V3 Client class Reducer.
A Reducer operation describes how to aggregate data points from multiple
time series into a single time series, where the value of each data point
in the resulting series is a function of all the already aligned values in
the input time series.
No cross-time series reduction. The output of theAligneris
returned.
Generated from protobuf enumREDUCE_NONE = 0;
REDUCE_MEAN
Value: 1
Reduce by computing the mean value across time series for each
alignment period. This reducer is valid forDELTAandGAUGEmetrics with
numeric or distribution values. Thevalue_typeof the output isDOUBLE.
Generated from protobuf enumREDUCE_MEAN = 1;
REDUCE_MIN
Value: 2
Reduce by computing the minimum value across time series for each
alignment period. This reducer is valid forDELTAandGAUGEmetrics
with numeric values. Thevalue_typeof the output is the same as thevalue_typeof the input.
Generated from protobuf enumREDUCE_MIN = 2;
REDUCE_MAX
Value: 3
Reduce by computing the maximum value across time series for each
alignment period. This reducer is valid forDELTAandGAUGEmetrics
with numeric values. Thevalue_typeof the output is the same as thevalue_typeof the input.
Generated from protobuf enumREDUCE_MAX = 3;
REDUCE_SUM
Value: 4
Reduce by computing the sum across time series for each
alignment period. This reducer is valid forDELTAandGAUGEmetrics
with numeric and distribution values. Thevalue_typeof the output is
the same as thevalue_typeof the input.
Generated from protobuf enumREDUCE_SUM = 4;
REDUCE_STDDEV
Value: 5
Reduce by computing the standard deviation across time series
for each alignment period. This reducer is valid forDELTAandGAUGEmetrics with numeric or distribution values. Thevalue_typeof the output isDOUBLE.
Generated from protobuf enumREDUCE_STDDEV = 5;
REDUCE_COUNT
Value: 6
Reduce by computing the number of data points across time series
for each alignment period. This reducer is valid forDELTAandGAUGEmetrics of numeric, Boolean, distribution, and stringvalue_type. Thevalue_typeof the output isINT64.
Generated from protobuf enumREDUCE_COUNT = 6;
REDUCE_COUNT_TRUE
Value: 7
Reduce by computing the number ofTrue-valued data points across time
series for each alignment period. This reducer is valid forDELTAandGAUGEmetrics of Booleanvalue_type. Thevalue_typeof the output
isINT64.
Generated from protobuf enumREDUCE_COUNT_TRUE = 7;
REDUCE_COUNT_FALSE
Value: 15
Reduce by computing the number ofFalse-valued data points across time
series for each alignment period. This reducer is valid forDELTAandGAUGEmetrics of Booleanvalue_type. Thevalue_typeof the output
isINT64.
Generated from protobuf enumREDUCE_COUNT_FALSE = 15;
REDUCE_FRACTION_TRUE
Value: 8
Reduce by computing the ratio of the number ofTrue-valued data points
to the total number of data points for each alignment period. This
reducer is valid forDELTAandGAUGEmetrics of Booleanvalue_type.
The output value is in the range [0.0, 1.0] and hasvalue_typeDOUBLE.
Generated from protobuf enumREDUCE_FRACTION_TRUE = 8;
REDUCE_PERCENTILE_99
Value: 9
Reduce by computing the99th
percentileof data points
across time series for each alignment period. This reducer is valid forGAUGEandDELTAmetrics of numeric and distribution type. The value
of the output isDOUBLE.
Generated from protobuf enumREDUCE_PERCENTILE_99 = 9;
REDUCE_PERCENTILE_95
Value: 10
Reduce by computing the95th
percentileof data points
across time series for each alignment period. This reducer is valid forGAUGEandDELTAmetrics of numeric and distribution type. The value
of the output isDOUBLE.
Generated from protobuf enumREDUCE_PERCENTILE_95 = 10;
REDUCE_PERCENTILE_50
Value: 11
Reduce by computing the50th
percentileof data points
across time series for each alignment period. This reducer is valid forGAUGEandDELTAmetrics of numeric and distribution type. The value
of the output isDOUBLE.
Generated from protobuf enumREDUCE_PERCENTILE_50 = 11;
REDUCE_PERCENTILE_05
Value: 12
Reduce by computing the5th
percentileof data points
across time series for each alignment period. This reducer is valid forGAUGEandDELTAmetrics of numeric and distribution type. The value
of the output isDOUBLE.
Generated from protobuf enumREDUCE_PERCENTILE_05 = 12;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Stackdriver Monitoring V3 Client - Class Reducer (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.Aggregation.Reducer)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.Aggregation.Reducer)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.Aggregation.Reducer)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.Aggregation.Reducer)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.Aggregation.Reducer)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.Aggregation.Reducer)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.Aggregation.Reducer)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.Aggregation.Reducer)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.Aggregation.Reducer)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.Aggregation.Reducer)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.Aggregation.Reducer)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.Aggregation.Reducer)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.Aggregation.Reducer)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.Aggregation.Reducer) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class Reducer.\n\nA Reducer operation describes how to aggregate data points from multiple\ntime series into a single time series, where the value of each data point\nin the resulting series is a function of all the already aligned values in\nthe input time series.\n\nProtobuf type `google.monitoring.v3.Aggregation.Reducer`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3 \\\\ Aggregation\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### REDUCE_NONE\n\n Value: 0\n\nNo cross-time series reduction. The output of the `Aligner` is\nreturned.\n\nGenerated from protobuf enum `REDUCE_NONE = 0;`\n\n### REDUCE_MEAN\n\n Value: 1\n\nReduce by computing the mean value across time series for each\nalignment period. This reducer is valid for\n[DELTA](https://cloud.google.com/php/docs/reference/common-protos/latest/Api.MetricDescriptor.MetricKind.html#_Google_Api_MetricDescriptor_MetricKind__DELTA) and\n[GAUGE](https://cloud.google.com/php/docs/reference/common-protos/latest/Api.MetricDescriptor.MetricKind.html#_Google_Api_MetricDescriptor_MetricKind__GAUGE) metrics with\nnumeric or distribution values. The `value_type` of the output is\n[DOUBLE](https://cloud.google.com/php/docs/reference/common-protos/latest/Api.MetricDescriptor.ValueType.html#_Google_Api_MetricDescriptor_ValueType__DOUBLE).\n\nGenerated from protobuf enum `REDUCE_MEAN = 1;`\n\n### REDUCE_MIN\n\n Value: 2\n\nReduce by computing the minimum value across time series for each\nalignment period. This reducer is valid for `DELTA` and `GAUGE` metrics\nwith numeric values. The `value_type` of the output is the same as the\n`value_type` of the input.\n\nGenerated from protobuf enum `REDUCE_MIN = 2;`\n\n### REDUCE_MAX\n\n Value: 3\n\nReduce by computing the maximum value across time series for each\nalignment period. This reducer is valid for `DELTA` and `GAUGE` metrics\nwith numeric values. The `value_type` of the output is the same as the\n`value_type` of the input.\n\nGenerated from protobuf enum `REDUCE_MAX = 3;`\n\n### REDUCE_SUM\n\n Value: 4\n\nReduce by computing the sum across time series for each\nalignment period. This reducer is valid for `DELTA` and `GAUGE` metrics\nwith numeric and distribution values. The `value_type` of the output is\nthe same as the `value_type` of the input.\n\nGenerated from protobuf enum `REDUCE_SUM = 4;`\n\n### REDUCE_STDDEV\n\n Value: 5\n\nReduce by computing the standard deviation across time series\nfor each alignment period. This reducer is valid for `DELTA` and\n`GAUGE` metrics with numeric or distribution values. The `value_type`\nof the output is `DOUBLE`.\n\nGenerated from protobuf enum `REDUCE_STDDEV = 5;`\n\n### REDUCE_COUNT\n\n Value: 6\n\nReduce by computing the number of data points across time series\nfor each alignment period. This reducer is valid for `DELTA` and\n`GAUGE` metrics of numeric, Boolean, distribution, and string\n`value_type`. The `value_type` of the output is `INT64`.\n\nGenerated from protobuf enum `REDUCE_COUNT = 6;`\n\n### REDUCE_COUNT_TRUE\n\n Value: 7\n\nReduce by computing the number of `True`-valued data points across time\nseries for each alignment period. This reducer is valid for `DELTA` and\n`GAUGE` metrics of Boolean `value_type`. The `value_type` of the output\nis `INT64`.\n\nGenerated from protobuf enum `REDUCE_COUNT_TRUE = 7;`\n\n### REDUCE_COUNT_FALSE\n\n Value: 15\n\nReduce by computing the number of `False`-valued data points across time\nseries for each alignment period. This reducer is valid for `DELTA` and\n`GAUGE` metrics of Boolean `value_type`. The `value_type` of the output\nis `INT64`.\n\nGenerated from protobuf enum `REDUCE_COUNT_FALSE = 15;`\n\n### REDUCE_FRACTION_TRUE\n\n Value: 8\n\nReduce by computing the ratio of the number of `True`-valued data points\nto the total number of data points for each alignment period. This\nreducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`.\n\nThe output value is in the range \\[0.0, 1.0\\] and has `value_type`\n`DOUBLE`.\n\nGenerated from protobuf enum `REDUCE_FRACTION_TRUE = 8;`\n\n### REDUCE_PERCENTILE_99\n\n Value: 9\n\nReduce by computing the [99th\npercentile](https://en.wikipedia.org/wiki/Percentile) of data points\nacross time series for each alignment period. This reducer is valid for\n`GAUGE` and `DELTA` metrics of numeric and distribution type. The value\nof the output is `DOUBLE`.\n\nGenerated from protobuf enum `REDUCE_PERCENTILE_99 = 9;`\n\n### REDUCE_PERCENTILE_95\n\n Value: 10\n\nReduce by computing the [95th\npercentile](https://en.wikipedia.org/wiki/Percentile) of data points\nacross time series for each alignment period. This reducer is valid for\n`GAUGE` and `DELTA` metrics of numeric and distribution type. The value\nof the output is `DOUBLE`.\n\nGenerated from protobuf enum `REDUCE_PERCENTILE_95 = 10;`\n\n### REDUCE_PERCENTILE_50\n\n Value: 11\n\nReduce by computing the [50th\npercentile](https://en.wikipedia.org/wiki/Percentile) of data points\nacross time series for each alignment period. This reducer is valid for\n`GAUGE` and `DELTA` metrics of numeric and distribution type. The value\nof the output is `DOUBLE`.\n\nGenerated from protobuf enum `REDUCE_PERCENTILE_50 = 11;`\n\n### REDUCE_PERCENTILE_05\n\n Value: 12\n\nReduce by computing the [5th\npercentile](https://en.wikipedia.org/wiki/Percentile) of data points\nacross time series for each alignment period. This reducer is valid for\n`GAUGE` and `DELTA` metrics of numeric and distribution type. The value\nof the output is `DOUBLE`.\n\nGenerated from protobuf enum `REDUCE_PERCENTILE_05 = 12;`"]]