mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
tsweb: add float64 to logged metrics
A previously added metric which was float64 was being ignored in tsweb, because it previously only accepted int64 and ints. It can be handled in the same way as ints. Signed-off-by: julianknodt <julianknodt@gmail.com>
This commit is contained in:
parent
53a2f63658
commit
3377089583
@ -409,7 +409,7 @@ funcRet = fmt.Sprintf(" returning %T", v)
|
|||||||
case expvar.Func:
|
case expvar.Func:
|
||||||
val := v()
|
val := v()
|
||||||
switch val.(type) {
|
switch val.(type) {
|
||||||
case int64, int:
|
case float64, int64, int:
|
||||||
fmt.Fprintf(w, "# TYPE %s %s\n%s %v\n", name, typ, name, val)
|
fmt.Fprintf(w, "# TYPE %s %s\n%s %v\n", name, typ, name, val)
|
||||||
default:
|
default:
|
||||||
fmt.Fprintf(w, "# skipping expvar func %q returning unknown type %T\n", name, val)
|
fmt.Fprintf(w, "# skipping expvar func %q returning unknown type %T\n", name, val)
|
||||||
|
Loading…
Reference in New Issue
Block a user