Skip to content

Commit

Permalink
Merge pull request #15 from levenlabs/master
Browse files Browse the repository at this point in the history
Switch DELTA to gauge from counter
  • Loading branch information
frodenas authored Sep 12, 2017
2 parents 1d0f1d7 + 91a92b2 commit 987b8d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion collectors/monitoring_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 987b8d6

Please sign in to comment.