Merge branch 'master' of github.com:tus/tusd into v1
This commit is contained in:
commit
ab641b6f89
|
@ -33,3 +33,5 @@ WORKDIR /srv/tusd-data
|
||||||
EXPOSE 1080
|
EXPOSE 1080
|
||||||
ENTRYPOINT ["tusd"]
|
ENTRYPOINT ["tusd"]
|
||||||
CMD ["--hooks-dir","/srv/tusd-hooks"]
|
CMD ["--hooks-dir","/srv/tusd-hooks"]
|
||||||
|
|
||||||
|
USER tusd
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"github.com/tus/tusd/pkg/prometheuscollector"
|
"github.com/tus/tusd/pkg/prometheuscollector"
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
)
|
)
|
||||||
|
|
||||||
var MetricsOpenConnections = prometheus.NewGauge(prometheus.GaugeOpts{
|
var MetricsOpenConnections = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||||
|
@ -28,5 +29,5 @@ func SetupMetrics(handler *handler.Handler) {
|
||||||
prometheus.MustRegister(prometheuscollector.New(handler.Metrics))
|
prometheus.MustRegister(prometheuscollector.New(handler.Metrics))
|
||||||
|
|
||||||
stdout.Printf("Using %s as the metrics path.\n", Flags.MetricsPath)
|
stdout.Printf("Using %s as the metrics path.\n", Flags.MetricsPath)
|
||||||
http.Handle(Flags.MetricsPath, prometheus.Handler())
|
http.Handle(Flags.MetricsPath, promhttp.Handler())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue