Reference documentation and code samples for the Cloud Monitoring V3 API module Google::Cloud::Monitoring::V3::Aggregation::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.
Constants
REDUCE_NONE
value: 0 No cross-time series reduction. The output of the Aligner is
returned.
REDUCE_MEAN
value: 1 Reduce by computing the mean value across time series for each
alignment period. This reducer is valid for
DELTA and
GAUGE metrics with
numeric or distribution values. The value_type of the output is
DOUBLE.
REDUCE_MIN
value: 2 Reduce by computing the minimum value across time series for each
alignment period. This reducer is valid for DELTA and GAUGE metrics
with numeric values. The value_type of the output is the same as the
value_type of the input.
REDUCE_MAX
value: 3 Reduce by computing the maximum value across time series for each
alignment period. This reducer is valid for DELTA and GAUGE metrics
with numeric values. The value_type of the output is the same as the
value_type of the input.
REDUCE_SUM
value: 4 Reduce by computing the sum across time series for each
alignment period. This reducer is valid for DELTA and GAUGE metrics
with numeric and distribution values. The value_type of the output is
the same as the value_type of the input.
REDUCE_STDDEV
value: 5 Reduce by computing the standard deviation across time series
for each alignment period. This reducer is valid for DELTA and
GAUGE metrics with numeric or distribution values. The value_type
of the output is DOUBLE.
REDUCE_COUNT
value: 6 Reduce by computing the number of data points across time series
for each alignment period. This reducer is valid for DELTA and
GAUGE metrics of numeric, Boolean, distribution, and string
value_type. The value_type of the output is INT64.
REDUCE_COUNT_TRUE
value: 7 Reduce by computing the number of True-valued data points across time
series for each alignment period. This reducer is valid for DELTA and
GAUGE metrics of Boolean value_type. The value_type of the output
is INT64.
REDUCE_COUNT_FALSE
value: 15 Reduce by computing the number of False-valued data points across time
series for each alignment period. This reducer is valid for DELTA and
GAUGE metrics of Boolean value_type. The value_type of the output
is INT64.
REDUCE_FRACTION_TRUE
value: 8 Reduce by computing the ratio of the number of True-valued data points
to the total number of data points for each alignment period. This
reducer is valid for DELTA and GAUGE metrics of Boolean value_type.
The output value is in the range [0.0, 1.0] and has value_typeDOUBLE.
REDUCE_PERCENTILE_99
value: 9 Reduce by computing the 99th
percentile of data points
across time series for each alignment period. This reducer is valid for
GAUGE and DELTA metrics of numeric and distribution type. The value
of the output is DOUBLE.
REDUCE_PERCENTILE_95
value: 10 Reduce by computing the 95th
percentile of data points
across time series for each alignment period. This reducer is valid for
GAUGE and DELTA metrics of numeric and distribution type. The value
of the output is DOUBLE.
REDUCE_PERCENTILE_50
value: 11 Reduce by computing the 50th
percentile of data points
across time series for each alignment period. This reducer is valid for
GAUGE and DELTA metrics of numeric and distribution type. The value
of the output is DOUBLE.
REDUCE_PERCENTILE_05
value: 12 Reduce by computing the 5th
percentile of data points
across time series for each alignment period. This reducer is valid for
GAUGE and DELTA metrics of numeric and distribution type. The value
of the output is DOUBLE.
[[["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,["# Cloud Monitoring V3 API - Module Google::Cloud::Monitoring::V3::Aggregation::Reducer (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-Aggregation-Reducer)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-Aggregation-Reducer) \nReference documentation and code samples for the Cloud Monitoring V3 API module Google::Cloud::Monitoring::V3::Aggregation::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\nConstants\n---------\n\n### REDUCE_NONE\n\n**value:** 0 \nNo cross-time series reduction. The output of the `Aligner` is\nreturned.\n\n### REDUCE_MEAN\n\n**value:** 1 \nReduce by computing the mean value across time series for each\nalignment period. This reducer is valid for\n[DELTA](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Api-MetricDescriptor-MetricKind#Google__Api__MetricDescriptor__MetricKind__DELTA \"Google::Api::MetricDescriptor::MetricKind::DELTA (constant)\") and\n[GAUGE](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Api-MetricDescriptor-MetricKind#Google__Api__MetricDescriptor__MetricKind__GAUGE \"Google::Api::MetricDescriptor::MetricKind::GAUGE (constant)\") metrics with\nnumeric or distribution values. The `value_type` of the output is\n[DOUBLE](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Api-MetricDescriptor-ValueType#Google__Api__MetricDescriptor__ValueType__DOUBLE \"Google::Api::MetricDescriptor::ValueType::DOUBLE (constant)\").\n\n### REDUCE_MIN\n\n**value:** 2 \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\n### REDUCE_MAX\n\n**value:** 3 \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\n### REDUCE_SUM\n\n**value:** 4 \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\n### REDUCE_STDDEV\n\n**value:** 5 \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\n### REDUCE_COUNT\n\n**value:** 6 \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\n### REDUCE_COUNT_TRUE\n\n**value:** 7 \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\n### REDUCE_COUNT_FALSE\n\n**value:** 15 \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\n### REDUCE_FRACTION_TRUE\n\n**value:** 8 \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`.\nThe output value is in the range \\[0.0, 1.0\\] and has `value_type`\n`DOUBLE`.\n\n### REDUCE_PERCENTILE_99\n\n**value:** 9 \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\n### REDUCE_PERCENTILE_95\n\n**value:** 10 \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\n### REDUCE_PERCENTILE_50\n\n**value:** 11 \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\n### REDUCE_PERCENTILE_05\n\n**value:** 12 \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`."]]