mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-11 04:32:29 +02:00
Don;t launch Prometheus server if Prometheus binding is not provided
This commit is contained in:
@@ -20,6 +20,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func initPrometheus() {
|
func initPrometheus() {
|
||||||
|
if len(conf.PrometheusBind) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
prometheusRequestsTotal = prometheus.NewCounter(prometheus.CounterOpts{
|
prometheusRequestsTotal = prometheus.NewCounter(prometheus.CounterOpts{
|
||||||
Name: "requests_total",
|
Name: "requests_total",
|
||||||
Help: "A counter of the total number of HTTP requests imgproxy processed.",
|
Help: "A counter of the total number of HTTP requests imgproxy processed.",
|
||||||
|
Reference in New Issue
Block a user