Skip to content

Changing label values for gauges #27

@JeremyMahieu

Description

@JeremyMahieu

I'm looking for a feature where if the label changes, that the previous metric is deleted. And a new one with the new label value is created. I understand that the current behavior is also favorable for some scenarios. For counters this would make sense not for gauges.

Current behavior:
Let's say you set a metric with label A to 100. If you now change the label to B you get two lines.

metric{label="A"} 100
metric{label="B"} 100

Wanted behavior:
Let's say you set a metric with label A to 100. If you now change the label to B you get one line.

metric{label="B"} 100

This way if you do sum(metric) you always get 100, instead of 200 with the previous method.
However this should not always be the case. You can have some labels that do this, some that don't
Let's say you have two power meters that have a tarrif. If the tarrif changes, you don't want extra lines, however you do want two lines, one for each meter.

power{meter="1", tariff="B"} 100
power{meter="2", tariff="A"} 50

Now if you do sum by (tariff) (power) you get A=50, B=100

If there was some way to delete a metric, or do a label update without creating a new line, this would be possible.
Or perhaps you could configure which labels are changeable and which labels branch out the metric.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions