diff --git a/lib/stackdriver.js b/lib/stackdriver.js index 7350203..49f8b8e 100644 --- a/lib/stackdriver.js +++ b/lib/stackdriver.js @@ -366,12 +366,13 @@ StackdriverBackend.prototype.flush = function(timestamp, metrics) { if (this.sendTimerPercentiles) { // send a point for each configured percentile, defaults to just 90th per statsd default for (var i=0; i < this.percentileValues.length; i++) { - if (typeof(metrics.timer_data[timer_key]["upper_" + this.percentileValues[i]]) == 'undefined') { + var normalizedPercentile = this.percentileValues[i].toString().replace(".", "_"); + if (typeof(metrics.timer_data[timer_key]["upper_" + normalizedPercentile]) == 'undefined') { continue; } this.add_point_to_message(stackdriverMessage, { - name : timer_key + "." + this.percentileValues[i] + "_pct", - value : metrics.timer_data[timer_key]["upper_" + this.percentileValues[i]], + name : timer_key + "." + normalizedPercentile + "_pct", + value : metrics.timer_data[timer_key]["upper_" + normalizedPercentile], collected_at: timestamp }); }