|
|
@@ -161,6 +161,23 @@ var (
|
|
|
reportDbTotalSizeInBytesMu sync.RWMutex
|
|
|
reportDbTotalSizeInBytes = func() float64 { return 0 }
|
|
|
|
|
|
+ // TODO: remove this in v3.5
|
|
|
+ dbTotalSizeDebugging = prometheus.NewGaugeFunc(prometheus.GaugeOpts{
|
|
|
+ Namespace: "etcd_debugging",
|
|
|
+ Subsystem: "mvcc",
|
|
|
+ Name: "db_total_size_in_bytes",
|
|
|
+ Help: "Total size of the underlying database physically allocated in bytes.",
|
|
|
+ },
|
|
|
+ func() float64 {
|
|
|
+ reportDbTotalSizeInBytesDebuggingMu.RLock()
|
|
|
+ defer reportDbTotalSizeInBytesDebuggingMu.RUnlock()
|
|
|
+ return reportDbTotalSizeInBytesDebugging()
|
|
|
+ },
|
|
|
+ )
|
|
|
+ // overridden by mvcc initialization
|
|
|
+ reportDbTotalSizeInBytesDebuggingMu sync.RWMutex
|
|
|
+ reportDbTotalSizeInBytesDebugging = func() float64 { return 0 }
|
|
|
+
|
|
|
dbTotalSizeInUse = prometheus.NewGaugeFunc(prometheus.GaugeOpts{
|
|
|
Namespace: "etcd",
|
|
|
Subsystem: "mvcc",
|
|
|
@@ -218,6 +235,7 @@ func init() {
|
|
|
prometheus.MustRegister(dbCompactionTotalMs)
|
|
|
prometheus.MustRegister(dbCompactionKeysCounter)
|
|
|
prometheus.MustRegister(dbTotalSize)
|
|
|
+ prometheus.MustRegister(dbTotalSizeDebugging)
|
|
|
prometheus.MustRegister(dbTotalSizeInUse)
|
|
|
prometheus.MustRegister(hashSec)
|
|
|
prometheus.MustRegister(hashRevSec)
|