Implement reporting status classes in metrics (#8548)
This commit introduces a backwards compatible command line option --report-status-classes which will enable reporting response status classes (2xx, 3xx..) instead of status codes in exported metrics.
This commit is contained in:
parent
0240dd3fba
commit
4da96ea26a
7 changed files with 71 additions and 16 deletions
|
|
@ -133,7 +133,7 @@ func main() {
|
|||
|
||||
mc := metric.NewDummyCollector()
|
||||
if conf.EnableMetrics {
|
||||
mc, err = metric.NewCollector(conf.MetricsPerHost, reg, conf.IngressClassConfiguration.Controller, *conf.MetricsBuckets)
|
||||
mc, err = metric.NewCollector(conf.MetricsPerHost, conf.ReportStatusClasses, reg, conf.IngressClassConfiguration.Controller, *conf.MetricsBuckets)
|
||||
if err != nil {
|
||||
klog.Fatalf("Error creating prometheus collector: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue