add metrics and sample node.js function

This commit is contained in:
Alex
2016-12-22 23:09:44 +00:00
parent 6073cd79f6
commit 2b9a1c10e4
6 changed files with 40 additions and 12 deletions

View File

@ -6,8 +6,14 @@ import (
"github.com/prometheus/client_golang/prometheus"
)
// Handler returns the global http.Handler that provides the prometheus
// metrics format on GET requests
func Handler() http.Handler {
// MetricOptions to be used by web handlers
type MetricOptions struct {
GatewayRequestsTotal prometheus.Counter
GatewayServerlessServedTotal prometheus.Counter
GatewayFunctions prometheus.Histogram
}
// PrometheusHandler Bootstraps prometheus for metrics collection
func PrometheusHandler() http.Handler {
return prometheus.Handler()
}