-
Notifications
You must be signed in to change notification settings - Fork 105
groupByTags tag parsing adds bad tags #1917
Comments
Perhaps |
@shanson7 do you feel the following 2 tests adequately cover the problem (if not, can you clarify):
I think we're going about this the wrong way. What's not clear to me is how to generalize this. if any series target can be any arbitrary mixture of function calls and various series (each with possibly different sets of tags, both in terms of the tag names as well as values), then what are the tags of said series? @fkaleo's PR mentions " SetTags should consider as tags only the tag expressions (ie. ;tag=value) that are found after the end of the last function of the target.". Why those particular tags? this feels completely arbitrary. I don't think we can really assume how this should be reconciled ? Furthermore, I think we need to be mindful that groupByTag not only needs a proper set of tags, but also a proper name. If by the time groupByTags runs, we then need to do string parsing to figure out what the tags are of the input (and name), that feels wrong. rather, we should probably have each intermediate step somehow set tags and names appropriately, such that groupByTags doesn't have to call SetTags to begin with. So perhaps we need to figure out/implement graphite-project/graphite-web#2639 first. |
Maybe? I'd like to see those tests using the
The tags of the series are well known, they are in the So, I'm not sure that I would consider this a bug in |
Describe the bug
groupByTags builds a buffer of
;
delimited tags to form thekey
and then groups all series with the same key together. To get the individual tag values back, it calls SetTags() on the result series.Given input from a "complex" pipeline like:
and let's say the input series just has the cluster tag. After going through
SetTags()
we get tags like:name=divideSeries(cpu.percent.user.g
cluster=clusterName
namespace=os, 10))
groupByTags should have just produced the
name
tag but because it callsSetTags()
and the target after divideSeriesLists had values likedivideSeries(cpu.percent.user;cluster=clusterName;namespace=os,removeBelowValue(cpu.percent.idle;cluster=clusterName;namespace=os, 10))
it just naively splits on;
and adds some bogus tags.The text was updated successfully, but these errors were encountered: