mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-17 15:36:48 +00:00
fix(prom-aggr): added fix for prom aggregation
This commit is contained in:
parent
7f19df18c3
commit
68291eee90
@ -2,6 +2,7 @@ package clickhouseprometheus
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/prometheus/prometheus/prompb"
|
||||
)
|
||||
@ -17,7 +18,12 @@ func unmarshalLabels(s string) ([]prompb.Label, string, error) {
|
||||
for n, v := range m {
|
||||
if n == "__name__" {
|
||||
metricName = v
|
||||
} else {
|
||||
if strings.Contains(n, ".") {
|
||||
n = `"` + n + `"`
|
||||
}
|
||||
}
|
||||
|
||||
res = append(res, prompb.Label{
|
||||
Name: n,
|
||||
Value: v,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user