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 c3e1f87048
commit 86bafe796c
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) {