mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
Changes in series names (and types) exposed (#376)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
This commit is contained in:
parent
d9129adb52
commit
2945db18ca
|
@ -97,7 +97,7 @@ func newCompactorMetrics(r prometheus.Registerer) *compactorMetrics {
|
|||
Buckets: prometheus.ExponentialBuckets(1, 2, 10),
|
||||
})
|
||||
m.chunkSize = prometheus.NewHistogram(prometheus.HistogramOpts{
|
||||
Name: "prometheus_tsdb_compaction_chunk_size",
|
||||
Name: "prometheus_tsdb_compaction_chunk_size_bytes",
|
||||
Help: "Final size of chunks on their first compaction",
|
||||
Buckets: prometheus.ExponentialBuckets(32, 1.5, 12),
|
||||
})
|
||||
|
@ -107,7 +107,7 @@ func newCompactorMetrics(r prometheus.Registerer) *compactorMetrics {
|
|||
Buckets: prometheus.ExponentialBuckets(4, 1.5, 12),
|
||||
})
|
||||
m.chunkRange = prometheus.NewHistogram(prometheus.HistogramOpts{
|
||||
Name: "prometheus_tsdb_compaction_chunk_range",
|
||||
Name: "prometheus_tsdb_compaction_chunk_range_seconds",
|
||||
Help: "Final time range of chunks on their first compaction",
|
||||
Buckets: prometheus.ExponentialBuckets(100, 4, 10),
|
||||
})
|
||||
|
|
8
db.go
8
db.go
|
@ -140,17 +140,17 @@ func newDBMetrics(db *DB, r prometheus.Registerer) *dbMetrics {
|
|||
return float64(len(db.blocks))
|
||||
})
|
||||
m.symbolTableSize = prometheus.NewGaugeFunc(prometheus.GaugeOpts{
|
||||
Name: "prometheus_tsdb_symbol_table_size",
|
||||
Name: "prometheus_tsdb_symbol_table_size_bytes",
|
||||
Help: "Size of symbol table on disk (in bytes)",
|
||||
}, func() float64 {
|
||||
db.mtx.RLock()
|
||||
blocks := db.blocks[:]
|
||||
db.mtx.RUnlock()
|
||||
symTblSize := float64(0)
|
||||
symTblSize := uint64(0)
|
||||
for _, b := range blocks {
|
||||
symTblSize += float64(b.GetSymbolTableSize())
|
||||
symTblSize += b.GetSymbolTableSize()
|
||||
}
|
||||
return symTblSize
|
||||
return float64(symTblSize)
|
||||
})
|
||||
m.reloads = prometheus.NewCounter(prometheus.CounterOpts{
|
||||
Name: "prometheus_tsdb_reloads_total",
|
||||
|
|
14
head.go
14
head.go
|
@ -82,8 +82,8 @@ type headMetrics struct {
|
|||
seriesRemoved prometheus.Counter
|
||||
seriesNotFound prometheus.Counter
|
||||
chunks prometheus.Gauge
|
||||
chunksCreated prometheus.Gauge
|
||||
chunksRemoved prometheus.Gauge
|
||||
chunksCreated prometheus.Counter
|
||||
chunksRemoved prometheus.Counter
|
||||
gcDuration prometheus.Summary
|
||||
minTime prometheus.GaugeFunc
|
||||
maxTime prometheus.GaugeFunc
|
||||
|
@ -102,27 +102,27 @@ func newHeadMetrics(h *Head, r prometheus.Registerer) *headMetrics {
|
|||
Name: "prometheus_tsdb_head_series",
|
||||
Help: "Total number of series in the head block.",
|
||||
})
|
||||
m.seriesCreated = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
m.seriesCreated = prometheus.NewCounter(prometheus.CounterOpts{
|
||||
Name: "prometheus_tsdb_head_series_created_total",
|
||||
Help: "Total number of series created in the head",
|
||||
})
|
||||
m.seriesRemoved = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
m.seriesRemoved = prometheus.NewCounter(prometheus.CounterOpts{
|
||||
Name: "prometheus_tsdb_head_series_removed_total",
|
||||
Help: "Total number of series removed in the head",
|
||||
})
|
||||
m.seriesNotFound = prometheus.NewCounter(prometheus.CounterOpts{
|
||||
Name: "prometheus_tsdb_head_series_not_found",
|
||||
Name: "prometheus_tsdb_head_series_not_found_total",
|
||||
Help: "Total number of requests for series that were not found.",
|
||||
})
|
||||
m.chunks = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "prometheus_tsdb_head_chunks",
|
||||
Help: "Total number of chunks in the head block.",
|
||||
})
|
||||
m.chunksCreated = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
m.chunksCreated = prometheus.NewCounter(prometheus.CounterOpts{
|
||||
Name: "prometheus_tsdb_head_chunks_created_total",
|
||||
Help: "Total number of chunks created in the head",
|
||||
})
|
||||
m.chunksRemoved = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
m.chunksRemoved = prometheus.NewCounter(prometheus.CounterOpts{
|
||||
Name: "prometheus_tsdb_head_chunks_removed_total",
|
||||
Help: "Total number of chunks removed in the head",
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue