Documentation ¶
Index ¶
- func AddMetricsHandler(handler http.HandlerFunc, prometheusQuery PrometheusQueryFetcher) http.HandlerFunc
- func AttachExternalWatcher(endpointURL url.URL, metricsOptions MetricOptions, label string, ...)
- func PrometheusHandler() http.Handler
- func RegisterMetrics(metricsOptions MetricOptions)
- type MetricOptions
- type PrometheusQuery
- type PrometheusQueryFetcher
- type VectorQueryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMetricsHandler ¶
func AddMetricsHandler(handler http.HandlerFunc, prometheusQuery PrometheusQueryFetcher) http.HandlerFunc
AddMetricsHandler wraps a http.HandlerFunc with Prometheus metrics
func AttachExternalWatcher ¶
func PrometheusHandler ¶
PrometheusHandler Bootstraps prometheus for metrics collection
func RegisterMetrics ¶
func RegisterMetrics(metricsOptions MetricOptions)
RegisterMetrics registers with Prometheus for tracking
Types ¶
type MetricOptions ¶
type MetricOptions struct { GatewayFunctionInvocation *prometheus.CounterVec GatewayFunctionsHistogram *prometheus.HistogramVec ServiceReplicasCounter *prometheus.GaugeVec }
MetricOptions to be used by web handlers
func BuildMetricsOptions ¶
func BuildMetricsOptions() MetricOptions
BuildMetricsOptions builds metrics for tracking functions in the API gateway
type PrometheusQuery ¶
PrometheusQuery a PrometheusQuery
func NewPrometheusQuery ¶
func NewPrometheusQuery(host string, port int, client *http.Client) PrometheusQuery
NewPrometheusQuery create a NewPrometheusQuery
func (PrometheusQuery) Fetch ¶
func (q PrometheusQuery) Fetch(query string) (*VectorQueryResponse, error)
Fetch queries aggregated stats
type PrometheusQueryFetcher ¶
type PrometheusQueryFetcher interface {
Fetch(query string) (*VectorQueryResponse, error)
}
type VectorQueryResponse ¶
Click to show internal directories.
Click to hide internal directories.