Namespace invocation_total

This should be a "no-harm" change to use the namespace/sub-
system definition for CounterOpts.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2020-03-12 13:50:03 +00:00 committed by Alex Ellis
parent c4f924cfb5
commit 37bf15e508

View File

@ -50,16 +50,19 @@ func BuildMetricsOptions() MetricOptions {
gatewayFunctionInvocation := prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "gateway_function_invocation_total",
Help: "Individual function metrics",
Namespace: "gateway",
Subsystem: "function",
Name: "invocation_total",
Help: "Function metrics",
},
[]string{"function_name", "code"},
)
serviceReplicas := prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "gateway_service_count",
Help: "Docker service replicas",
Namespace: "gateway",
Name: "service_count",
Help: "Service replicas",
},
[]string{"function_name"},
)