From ee49a6a2f697b8c646237b8e869e1d9730aae981 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 26 Jan 2018 17:30:38 +0200 Subject: [PATCH] instrumentation targets --- pkg/server/instrument.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/server/instrument.go b/pkg/server/instrument.go index 1439bb5..c6f2a0a 100644 --- a/pkg/server/instrument.go +++ b/pkg/server/instrument.go @@ -19,13 +19,14 @@ type Instrument struct { } func NewInstrument() *Instrument { + // used for monitoring and alerting (RED method) histogram := prometheus.NewHistogramVec(prometheus.HistogramOpts{ Subsystem: "http", Name: "requests", Help: "Seconds spent serving HTTP requests.", Buckets: prometheus.DefBuckets, }, []string{"method", "path", "status"}) - + // used for horizontal pod auto-scaling (Kubernetes HPA v2) counter := prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: "http",