graphite-project / graphite-project/graphite-web
'preserveTags' flag for divideSeries, divideSeriesLists, asPercent
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
Several functions (at least divideSeries, divideSeriesLists, and asPercent) trash the tags of the inputs. This makes it difficult to use features in grafana that require tags (e.g. "Labels to Fields" transformation) or other functions like groupByTags post division.
It would be nice to have an option to preserve tags where the dividend and divisor have the same values.
Describe the solution you'd like
Add a flag (default to false for backwards compatibility) to preserve overlapping tags
Describe alternatives you've considered
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementations and tests for divideSeries, divideSeriesLists, and asPercent, then read how their input tags are currently handled. Define and test preservation of tags shared by dividend and divisor inputs, while confirming the new flag defaults to false for backward compatibility.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100