instrumentation targets

This commit is contained in:
Stefan Prodan
2018-01-26 17:30:38 +02:00
parent 5dd24cd3ad
commit ee49a6a2f6

View File

@@ -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",