tsweb: export version metrics to Prometheus

This will allow tracking build versions and runtime versions in
Prometheus.

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2022-11-22 11:22:26 +00:00
committed by Anton Tolchanov
parent 8d84178884
commit f053f16460
2 changed files with 10 additions and 0 deletions

View File

@@ -542,6 +542,12 @@ foo_totalY 4
promWriter{},
"custom_var_value 42\n",
},
{
"string_version_var",
"foo_version",
expvar.Func(func() any { return "1.2.3-foo15" }),
"foo_version{version=\"1.2.3-foo15\"} 1\n",
},
{
"field_ordering",
"foo",