MCPcopy Create free account
hub / github.com/cortexproject/cortex / getOrCreateSeries

Method getOrCreateSeries

pkg/util/push/appender.go:75–83  ·  view source on GitHub ↗
(ls labels.Labels)

Source from the content-addressed store, hash-verified

73}
74
75func (c *collectingAppender) getOrCreateSeries(ls labels.Labels) *collectedSeries {
76 key := ls.String()
77 if s, ok := c.series[key]; ok {
78 return s
79 }
80 s := &collectedSeries{labels: labels.NewBuilder(ls).Labels()}
81 c.series[key] = s
82 return s
83}
84
85func exemplarToProm(e exemplar.Exemplar) prompb.Exemplar {
86 return prompb.Exemplar{

Callers 2

AppendSampleMethod · 0.95
AppendHistogramMethod · 0.95

Calls 2

StringMethod · 0.65
LabelsMethod · 0.45

Tested by

no test coverage detected