lib/httpserver: add -enterprise and/or -cluster suffixes to short_version label of vm_app_version metric

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1635
This commit is contained in:
Aliaksandr Valialkin 2021-09-21 23:07:56 +03:00
parent 207c5760ce
commit 9ca1cbced1
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -18,7 +18,7 @@ import (
"github.com/VictoriaMetrics/metrics"
)
var versionRe = regexp.MustCompile(`v\d+\.\d+\.\d+`)
var versionRe = regexp.MustCompile(`v\d+\.\d+\.\d+(?:-enterprise)?(?:-cluster)?`)
// WritePrometheusMetrics writes all the registered metrics to w in Prometheus exposition format.
func WritePrometheusMetrics(w io.Writer) {