The problem occurs when a panel with two or more metric queries that use a wildcard tag value. There is a mis-match when attempting to align the metric values coming back from the datasource and the defined metrics. The code is looking for a * tag-value in order to make the alignment; but the value will have a .*. This causes the alignment to eventually default to the first metric definition.
The issue can be reproduced by:
Setup a Grafana panel with two or more metric queries.
Apply a tag with a wildcard (e.g. host=.*).
Set a tag prefix with unique values between the metrics.
The problem occurs when a panel with two or more metric queries that use a wildcard tag value. There is a mis-match when attempting to align the metric values coming back from the datasource and the defined metrics. The code is looking for a
*
tag-value in order to make the alignment; but the value will have a.*
. This causes the alignment to eventually default to the first metric definition.The issue can be reproduced by: