mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
metrics: add histogram support
Add initial histogram support. Updates tailscale/corp#8641 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -191,6 +191,8 @@ func writePromExpVar(w io.Writer, prefix string, kv expvar.KeyValue) {
|
||||
v.Do(func(kv expvar.KeyValue) {
|
||||
fmt.Fprintf(w, "%s{%s=%q} %v\n", name, cmpx.Or(v.Label, "label"), kv.Key, kv.Value)
|
||||
})
|
||||
case *metrics.Histogram:
|
||||
v.PromExport(w, name)
|
||||
case *expvar.Map:
|
||||
if label != "" && typ != "" {
|
||||
fmt.Fprintf(w, "# TYPE %s %s\n", name, typ)
|
||||
|
Reference in New Issue
Block a user