Sfoglia il codice sorgente

stackdriver: fix froamt annotation text for value

Erik Sundell 7 anni fa
parent
commit
2aae7e0c87
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      pkg/tsdb/stackdriver/annotation_query.go

+ 1 - 2
pkg/tsdb/stackdriver/annotation_query.go

@@ -2,7 +2,6 @@ package stackdriver
 
 
 import (
 import (
 	"context"
 	"context"
-	"fmt"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 	"time"
 	"time"
@@ -99,7 +98,7 @@ func formatAnnotationText(annotationText string, pointValue string, metricType s
 		}
 		}
 
 
 		if metaPartName == "value" {
 		if metaPartName == "value" {
-			return []byte(fmt.Sprintf("%f", pointValue))
+			return []byte(pointValue)
 		}
 		}
 
 
 		metaPartName = strings.Replace(metaPartName, "metric.label.", "", 1)
 		metaPartName = strings.Replace(metaPartName, "metric.label.", "", 1)