tasseo icon indicating copy to clipboard operation
tasseo copied to clipboard

use metric alias to find metrics instead of relying on target attribute

Open simao opened this issue 11 years ago • 1 comments

Sometimes graphite changes the target attribute it returns, so tasseo should not rely on it to find the data points.

This PR makes tasseo use the alias, which I think it is cleaner.

For example, if you try to use the following tasseo.metric.target:

scaleToSeconds(timeShift(stats.timers.rails.requests.count, '-30seconds'),1))

Graphite will return something like (notice the quotes):

scaleToSeconds(timeShift(stats.timers.rails.requests.count, -30seconds),1))

So it won't work, because tasseo can't find this metric in the response using the target it sent.

With this PR, graphite will always return target: <alias> so we can use metric.alias to find the data points in metricResults.

simao avatar Jul 31 '14 14:07 simao

What happens if alias is unset?

obfuscurity avatar Nov 08 '14 18:11 obfuscurity