Files
weave-scope/probe/instrumentation.go
Tom Wilkie a4ddd0094f Duplicate endpoints in the endpoint topology to account for NAT mapping.
Also, move spy.go into probe/endpoint and make it adhere to the Reporter interface.
2015-06-23 10:33:06 +00:00

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()
}