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

Method PostCreation

pkg/ingester/ingester.go:544–558  ·  view source on GitHub ↗

PostCreation implements SeriesLifecycleCallback interface.

(metric labels.Labels)

Source from the content-addressed store, hash-verified

542
543// PostCreation implements SeriesLifecycleCallback interface.
544func (u *userTSDB) PostCreation(metric labels.Labels) {
545 u.instanceSeriesCount.Inc()
546
547 metricName, err := extract.MetricNameFromLabels(metric)
548 if err != nil {
549 // This should never happen because it has already been checked in PreCreation().
550 return
551 }
552 u.seriesInMetric.increaseSeriesForMetric(metricName)
553 u.labelSetCounter.increaseSeriesLabelSet(u, metric)
554
555 if u.postingCache != nil {
556 u.postingCache.ExpireSeries(metric)
557 }
558}
559
560// PostDeletion implements SeriesLifecycleCallback interface.
561func (u *userTSDB) PostDeletion(metrics map[chunks.HeadSeriesRef]labels.Labels) {

Callers

nothing calls this directly

Calls 5

MetricNameFromLabelsFunction · 0.92
ExpireSeriesMethod · 0.65
IncMethod · 0.45

Tested by

no test coverage detected