Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

simao
Copy link

@simao simao commented Jul 31, 2014

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.

@obfuscurity
Copy link
Owner

What happens if alias is unset?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants