summaryrefslogtreecommitdiff
path: root/plugins/metrics
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/metrics')
-rw-r--r--plugins/metrics/config.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/metrics/config.go b/plugins/metrics/config.go
index 933b7eb8..9459bc9b 100644
--- a/plugins/metrics/config.go
+++ b/plugins/metrics/config.go
@@ -54,6 +54,8 @@ type Collector struct {
Labels []string `json:"labels"`
// Buckets for histogram metric.
Buckets []float64 `json:"buckets"`
+ // Objectives for the summary opts
+ Objectives map[float64]float64 `json:"objectives"`
}
// register application specific metrics.
@@ -109,10 +111,11 @@ func (c *Config) getCollectors() (map[string]prometheus.Collector, error) {
}
case Summary:
opts := prometheus.SummaryOpts{
- Name: name,
- Namespace: m.Namespace,
- Subsystem: m.Subsystem,
- Help: m.Help,
+ Name: name,
+ Namespace: m.Namespace,
+ Subsystem: m.Subsystem,
+ Help: m.Help,
+ Objectives: m.Objectives,
}
if len(m.Labels) != 0 {