mirror of
https://github.com/openfaas/faas.git
synced 2025-06-20 04:56:38 +00:00
Record metrics for invocations when they start
* This experimental patch records metrics as invocations start so that the metrics can be used to make better scale to zero decisions in faas-idler. Tested with Kubernetes on a single-node cluster, metrics reported as expected. Existing metrics still report. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
1eea381dd5
commit
96812d2cd8
@ -18,7 +18,7 @@ func MakeNotifierWrapper(next http.HandlerFunc, notifiers []HTTPNotifier) http.H
|
||||
|
||||
url := r.URL.String()
|
||||
for _, notifier := range notifiers {
|
||||
notifier.Notify(r.Method, url, url, writer.Status(), time.Since(then))
|
||||
notifier.Notify(r.Method, url, url, writer.Status(), "completed", time.Since(then))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user