mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
28 lines
524 B
Go
28 lines
524 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/weaveworks/scope/probe/endpoint"
|
|
)
|
|
|
|
var (
|
|
publishTicks = prometheus.NewCounterVec(
|
|
prometheus.CounterOpts{
|
|
Namespace: "scope",
|
|
Subsystem: "probe",
|
|
Name: "publish_ticks",
|
|
Help: "Number of publish ticks observed.",
|
|
},
|
|
[]string{},
|
|
)
|
|
)
|
|
|
|
func makePrometheusHandler() http.Handler {
|
|
prometheus.MustRegister(publishTicks)
|
|
prometheus.MustRegister(endpoint.SpyDuration)
|
|
return prometheus.Handler()
|
|
}
|