Skip to content

Commit

Permalink
fix: label assignment issue in promql rules (#5920)
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv committed Sep 11, 2024
1 parent b60b261 commit 4799d31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/query-service/rules/prom_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,11 @@ func (r *PromRule) String() string {
}

func toCommonSeries(series promql.Series) v3.Series {
commonSeries := v3.Series{}
commonSeries := v3.Series{
Labels: make(map[string]string),
LabelsArray: make([]map[string]string, 0),
Points: make([]v3.Point, 0),
}

for _, lbl := range series.Metric {
commonSeries.Labels[lbl.Name] = lbl.Value
Expand Down

0 comments on commit 4799d31

Please sign in to comment.