Use default namespace in metrics exporter

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit is contained in:
Vivek Singh
2020-03-22 23:23:50 +05:30
committed by Alex Ellis
parent f7b02b47f8
commit c0ba41ce33
4 changed files with 16 additions and 14 deletions

View File

@ -33,7 +33,7 @@ func readGauge(g prometheus.Metric) metricResult {
func Test_Describe_DescribesThePrometheusMetrics(t *testing.T) {
metricsOptions := BuildMetricsOptions()
exporter := NewExporter(metricsOptions, nil)
exporter := NewExporter(metricsOptions, nil, "openfaas-fn")
ch := make(chan *prometheus.Desc)
// defer close(ch)
@ -65,7 +65,7 @@ func Test_Describe_DescribesThePrometheusMetrics(t *testing.T) {
func Test_Collect_CollectsTheNumberOfReplicasOfAService(t *testing.T) {
metricsOptions := BuildMetricsOptions()
exporter := NewExporter(metricsOptions, nil)
exporter := NewExporter(metricsOptions, nil, "openfaas-fn")
expectedService := types.FunctionStatus{
Name: "function_with_two_replica",