Remove Prometheus tracking for forwarded requests

Forwarded requests were being logged in the function metrics and
I saw this when doing some testing on auto-scaling with K8s.

This change removes the call to the Prometheus notifier for any
calls which are forwarded to the provider and retains them for the
functions.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (VMware) 2018-03-26 13:12:29 +01:00
parent 949810c403
commit 9a1b119c9f

View File

@ -47,7 +47,7 @@ func main() {
Metrics: &metricsOptions,
}
functionNotifiers := []handlers.HTTPNotifier{loggingNotifier, prometheusNotifier}
forwardingNotifiers := []handlers.HTTPNotifier{loggingNotifier, prometheusNotifier}
forwardingNotifiers := []handlers.HTTPNotifier{loggingNotifier}
urlResolver := handlers.SingleHostBaseURLResolver{BaseURL: config.FunctionsProviderURL.String()}
var functionURLResolver handlers.BaseURLResolver