diff --git a/README.md b/README.md index 9c21c482..6ce08432 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Metrics gathered from Google Stackdriver Monitoring are converted to Prometheus 3. the metric type labels (see [Metrics List][metrics-list]) 4. the monitored resource labels (see [Monitored Resource Types][monitored-resources]) * For each timeseries, only the most recent data point is exported. -* Stackdriver `GAUGE` metric kinds are reported as Prometheus `Gauge` metrics; Stackdriver `DELTA` and `CUMULATIVE` metric kinds are reported as Prometheus `Counter` metrics. +* Stackdriver `GAUGE` and `DELTA` metric kinds are reported as Prometheus `Gauge` metrics; Stackdriver `CUMULATIVE` metric kinds are reported as Prometheus `Counter` metrics. * Only `BOOL`, `INT64`, `DOUBLE` and `DISTRIBUTION` metric types are supported, other types (`STRING` and `MONEY`) are discarded. * `DISTRIBUTION` metric type is reported as a Prometheus `Histogram`, except the `_sum` time series is not supported. diff --git a/collectors/monitoring_collector.go b/collectors/monitoring_collector.go index 22178f1e..f56dd95a 100644 --- a/collectors/monitoring_collector.go +++ b/collectors/monitoring_collector.go @@ -278,7 +278,7 @@ func (c *MonitoringCollector) reportTimeSeriesMetrics( case "GAUGE": metricValueType = prometheus.GaugeValue case "DELTA": - metricValueType = prometheus.CounterValue + metricValueType = prometheus.GaugeValue case "CUMULATIVE": metricValueType = prometheus.CounterValue default: