Refactoring prometheus metrics and labels (#2375)

This change mainly fixes few things around router and executor
exposed metrices.
1. We are trying to follow standard in metric names.
2. Lables such as namespace are colliding with kube-prometheus standards
so they are getting relabled to exported_namespace. Added function prefix
to resolve this.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2022-03-02 10:10:58 +05:30
committed by GitHub
parent 10f64a8d91
commit ded13229c0
3 changed files with 37 additions and 25 deletions
+3 -3
View File
@@ -43,12 +43,12 @@ var (
metricAddr = ":8080"
// function + http labels as strings
labelsStrings = []string{"cached", "namespace", "name", "host", "path", "method", "code"}
labelsStrings = []string{"cached", "function_namespace", "function_name", "host", "path", "method", "code"}
// Function http calls count
// cached: true | false, is this function service address cached locally
// namespace: function namespace
// name: function name
// function_namespace: function namespace
// function_name: function name
// code: http status code
// path: the client call the function on which http path
// method: the function's http method