mirror of
https://github.com/openfaas/faas.git
synced 2025-06-19 12:36:40 +00:00
Use default namespace in metrics exporter
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit is contained in:
@ -51,7 +51,7 @@ type PrometheusFunctionNotifier struct {
|
||||
func (p PrometheusFunctionNotifier) Notify(method string, URL string, originalURL string, statusCode int, event string, duration time.Duration) {
|
||||
serviceName := getServiceName(originalURL)
|
||||
if len(p.FunctionNamespace) > 0 {
|
||||
if index := strings.Index(serviceName, "."); index == -1 {
|
||||
if !strings.Contains(serviceName, ".") {
|
||||
serviceName = fmt.Sprintf("%s.%s", serviceName, p.FunctionNamespace)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user