Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion prometheus/counter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package prometheus
import (
"fmt"
"math"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -262,10 +263,11 @@ func TestCounterExemplar(t *testing.T) {
err = e.(error)
}
}()
// Should panic because of 65 runes.
// Should panic because of 129 runes.
counter.AddWithExemplar(42, Labels{
"abcdefghijklmnopqrstuvwxyz": "26+16 characters",
"x1234567": "8+15 characters",
"z": strings.Repeat("x", 63),
})
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion prometheus/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func MakeLabelPairs(desc *Desc, labelValues []string) []*dto.LabelPair {
}

// ExemplarMaxRunes is the max total number of runes allowed in exemplar labels.
const ExemplarMaxRunes = 64
const ExemplarMaxRunes = 128

// newExemplar creates a new dto.Exemplar from the provided values. An error is
// returned if any of the label names or values are invalid or if the total
Expand Down