@@ -419,7 +419,7 @@ func runReceive(
419419 }
420420 }
421421
422- level .Error (logger ).Log ("msg" , "setting up periodic tenant pruning" )
422+ level .Debug (logger ).Log ("msg" , "setting up periodic tenant pruning" )
423423 {
424424 ctx , cancel := context .WithCancel (context .Background ())
425425 g .Add (func () error {
@@ -440,19 +440,18 @@ func runReceive(
440440 })
441441 }
442442
443- level .Error (logger ).Log ("msg" , "setting up periodic top metrics collection" )
444- topMetricNumSeries := promauto .With (reg ).NewGaugeVec (prometheus.GaugeOpts {
445- Name : "thanos_receive_top_metric_num_series" ,
446- Help : "Number of series in top metric." ,
447- }, []string {"tenant" , "metric_name" })
443+ level .Debug (logger ).Log ("msg" , "setting up periodic top metrics collection" )
448444 {
445+ topMetricNumSeries := promauto .With (reg ).NewGaugeVec (prometheus.GaugeOpts {
446+ Name : "thanos_receive_top_metric_num_series" ,
447+ Help : "Number of series in top metric." ,
448+ }, []string {"tenant" , "metric_name" })
449449 ctx , cancel := context .WithCancel (context .Background ())
450450 g .Add (func () error {
451451 return runutil .Repeat (30 * time .Second , ctx .Done (), func () error {
452452 level .Error (logger ).Log ("msg" , "getting top metrics" )
453453 for _ , ts := range dbs .TenantStats (10 , labels .MetricName ) {
454454 for _ , ms := range ts .Stats .IndexPostingStats .CardinalityMetricsStats {
455- level .Error (logger ).Log ("msg" , "tenant" , ts .Tenant , "metric_name" , ms .Name , "count" , ms .Count )
456455 topMetricNumSeries .WithLabelValues (ts .Tenant , ms .Name ).Set (float64 (ms .Count ))
457456 }
458457 }
0 commit comments