diff --git a/pkg/ts/catalog/metrics.go b/pkg/ts/catalog/metrics.go index 4b6c35167528..9b41d977c69c 100644 --- a/pkg/ts/catalog/metrics.go +++ b/pkg/ts/catalog/metrics.go @@ -104,6 +104,11 @@ var histogramMetricsNames = map[string]struct{}{ "kv.replica_read_batch_evaluate.latency": {}, "kv.replica_write_batch_evaluate.latency": {}, "leases.requests.latency": {}, + "changefeed.nprocs_flush_nanos": {}, + "changefeed.nprocs_consume_event_nanos": {}, + "rebalancing.replicas.queriespersecond": {}, + "rebalancing.replicas.cpunanospersecond": {}, + "sql.pre_serve.mem.max": {}, } func allInternalTSMetricsNames() []string { diff --git a/pkg/util/metric/metric.go b/pkg/util/metric/metric.go index e3508c2ebdb3..e81b53328168 100644 --- a/pkg/util/metric/metric.go +++ b/pkg/util/metric/metric.go @@ -252,6 +252,7 @@ type HistogramOptions struct { } func NewHistogram(opt HistogramOptions) IHistogram { + opt.Metadata.MetricType = prometheusgo.MetricType_HISTOGRAM if hdrEnabled && opt.Mode != HistogramModePrometheus { if opt.Mode == HistogramModePreferHdrLatency { return NewHdrLatency(opt.Metadata, opt.Duration) @@ -481,6 +482,7 @@ func NewManualWindowHistogram( panic(err.Error()) } + meta.MetricType = prometheusgo.MetricType_HISTOGRAM h := &ManualWindowHistogram{ Metadata: meta, } diff --git a/pkg/util/schedulerlatency/histogram.go b/pkg/util/schedulerlatency/histogram.go index 6cb7c35e575f..0db51f01b860 100644 --- a/pkg/util/schedulerlatency/histogram.go +++ b/pkg/util/schedulerlatency/histogram.go @@ -51,6 +51,7 @@ func newRuntimeHistogram(metadata metric.Metadata, buckets []float64) *runtimeHi if buckets[0] == math.Inf(-1) { buckets = buckets[1:] } + metadata.MetricType = prometheusgo.MetricType_HISTOGRAM h := &runtimeHistogram{ Metadata: metadata, // Go runtime histograms as of go1.19 are always in seconds whereas