summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-15 13:39:46 +0300
committerValery Piashchynski <[email protected]>2020-12-15 13:39:46 +0300
commit091b4f56996d12235f7de6ab1b15ea1ee69d1d7d (patch)
tree4db77b444eec50df6ac420486da71490f083e218 /plugins
parentb44d272312389691920e42e5295395bef0d3b769 (diff)
parent73d3f968b690b0e34e571580243e5fdd0d42199c (diff)
Merge remote-tracking branch 'origin/master' into 2.0
# Conflicts: # .rr.yaml # plugins/metrics/config_test.go # service/metrics/rpc.go
Diffstat (limited to 'plugins')
-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 {