Mark some Summaries explicitly as having no objectives
With the next release of client_golang, Summaries will not have objectives by default. Interestingly, this will do the right thing for the Summaries affected by this commit. However, right now those summaries do get the old default objectives. They don't really make sense because the affected Summaries receive Observations quite infrequently (far less than once in the 10m max age currently used). To not get surprising changes when moving on to client_golang v1, let's explicitly set the Summaries as objective-less now. Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
parent
c16e90ef6f
commit
318e006065
|
@ -104,12 +104,14 @@ func newMetrics(r prometheus.Registerer) *metrics {
|
|||
m := &metrics{}
|
||||
|
||||
m.gcDuration = prometheus.NewSummary(prometheus.SummaryOpts{
|
||||
Name: "alertmanager_nflog_gc_duration_seconds",
|
||||
Help: "Duration of the last notification log garbage collection cycle.",
|
||||
Name: "alertmanager_nflog_gc_duration_seconds",
|
||||
Help: "Duration of the last notification log garbage collection cycle.",
|
||||
Objectives: map[float64]float64{},
|
||||
})
|
||||
m.snapshotDuration = prometheus.NewSummary(prometheus.SummaryOpts{
|
||||
Name: "alertmanager_nflog_snapshot_duration_seconds",
|
||||
Help: "Duration of the last notification log snapshot.",
|
||||
Name: "alertmanager_nflog_snapshot_duration_seconds",
|
||||
Help: "Duration of the last notification log snapshot.",
|
||||
Objectives: map[float64]float64{},
|
||||
})
|
||||
m.snapshotSize = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "alertmanager_nflog_snapshot_size_bytes",
|
||||
|
|
|
@ -36,7 +36,7 @@ import (
|
|||
"github.com/prometheus/alertmanager/types"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/model"
|
||||
"github.com/satori/go.uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
// ErrNotFound is returned if a silence was not found.
|
||||
|
@ -225,12 +225,14 @@ func newMetrics(r prometheus.Registerer, s *Silences) *metrics {
|
|||
m := &metrics{}
|
||||
|
||||
m.gcDuration = prometheus.NewSummary(prometheus.SummaryOpts{
|
||||
Name: "alertmanager_silences_gc_duration_seconds",
|
||||
Help: "Duration of the last silence garbage collection cycle.",
|
||||
Name: "alertmanager_silences_gc_duration_seconds",
|
||||
Help: "Duration of the last silence garbage collection cycle.",
|
||||
Objectives: map[float64]float64{},
|
||||
})
|
||||
m.snapshotDuration = prometheus.NewSummary(prometheus.SummaryOpts{
|
||||
Name: "alertmanager_silences_snapshot_duration_seconds",
|
||||
Help: "Duration of the last silence snapshot.",
|
||||
Name: "alertmanager_silences_snapshot_duration_seconds",
|
||||
Help: "Duration of the last silence snapshot.",
|
||||
Objectives: map[float64]float64{},
|
||||
})
|
||||
m.snapshotSize = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "alertmanager_silences_snapshot_size_bytes",
|
||||
|
|
Loading…
Reference in New Issue