faas/gateway/metrics/metrics.go
Alex ab2f8e85f3 Introduce gateway_function_invocation_total to track individual functions
Introduce prometheus_alertmanager into stack - have it fire into webhook stash
2017-01-21 10:11:33 +00:00

21 lines
506 B
Go

package metrics
import (
"net/http"
"github.com/prometheus/client_golang/prometheus"
)
// MetricOptions to be used by web handlers
type MetricOptions struct {
GatewayRequestsTotal prometheus.Counter
GatewayServerlessServedTotal prometheus.Counter
GatewayFunctions prometheus.Histogram
GatewayFunctionInvocation *prometheus.CounterVec
}
// PrometheusHandler Bootstraps prometheus for metrics collection
func PrometheusHandler() http.Handler {
return prometheus.Handler()
}