summaryrefslogtreecommitdiff
path: root/vendor/github.com/prometheus/common/expfmt/text_create.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/prometheus/common/expfmt/text_create.go')
-rw-r--r--vendor/github.com/prometheus/common/expfmt/text_create.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/prometheus/common/expfmt/text_create.go b/vendor/github.com/prometheus/common/expfmt/text_create.go
index f9b8265a9..4b86434b3 100644
--- a/vendor/github.com/prometheus/common/expfmt/text_create.go
+++ b/vendor/github.com/prometheus/common/expfmt/text_create.go
@@ -354,7 +354,7 @@ func writeNameAndLabelPairs(
if name != "" {
// If the name does not pass the legacy validity check, we must put the
// metric name inside the braces.
- if !model.IsValidLegacyMetricName(model.LabelValue(name)) {
+ if !model.IsValidLegacyMetricName(name) {
metricInsideBraces = true
err := w.WriteByte(separator)
written++
@@ -498,7 +498,7 @@ func writeInt(w enhancedWriter, i int64) (int, error) {
// writeName writes a string as-is if it complies with the legacy naming
// scheme, or escapes it in double quotes if not.
func writeName(w enhancedWriter, name string) (int, error) {
- if model.IsValidLegacyMetricName(model.LabelValue(name)) {
+ if model.IsValidLegacyMetricName(name) {
return w.WriteString(name)
}
var written int