mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-03-05 19:40:23 +00:00
instrumentation targets
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user