Anton Tolchanov
11e6247d2a
tsweb: expose native Prometheus metrics in /debug/varz
...
The handler will expose built-in process and Go metrics by default,
which currently duplicate some of the expvar-proxied metrics
(`goroutines` vs `go_goroutines`, `memstats` vs `go_memstats`), but as
long as their names are different, Prometheus server will just scrape
both.
This will change /debug/varz behaviour for most tsweb binaries, but
notably not for control, which configures a `tsweb.VarzHandler`
[explicitly](https://github.com/tailscale/corp/blob/a5b5d5167f1a2b780d313ec6a30e7b96dfa25b2d/cmd/tailcontrol/tailcontrol.go#L779 )
Updates https://github.com/tailscale/corp/issues/10205
Signed-off-by: Anton Tolchanov <anton@tailscale.com >
2023-04-11 08:37:32 +01:00
David Anderson
8b2ae47c31
version: unexport all vars, turn Short/Long into funcs
...
The other formerly exported values aren't used outside the package,
so just unexport them.
Signed-off-by: David Anderson <danderson@tailscale.com >
2023-02-11 07:29:55 +00:00
Will Norris
71029cea2d
all: update copyright and license headers
...
This updates all source files to use a new standard header for copyright
and license declaration. Notably, copyright no longer includes a date,
and we now use the standard SPDX-License-Identifier header.
This commit was done almost entirely mechanically with perl, and then
some minimal manual fixes.
Updates #6865
Signed-off-by: Will Norris <will@tailscale.com >
2023-01-27 15:36:29 -08:00
Josh Bleecher Snyder
0868329936
all: use any instead of interface{}
...
My favorite part of generics.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2022-03-17 11:35:09 -07:00
Brad Fitzpatrick
722942dd46
tsweb: restore CPU profiling handler
...
It was accidentally deleted in the earlier 0022c3d2e (#2143 ) refactor.
Lock it in with a test.
Fixes tailscale/corp#2503
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-09-02 09:24:29 -07:00
David Anderson
0022c3d2e2
tsweb: replace NewMux with a more flexible DebugHandler.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-06-16 19:00:47 -07:00