-
Notifications
You must be signed in to change notification settings - Fork 881
feat: expose DERP server debug metrics #12135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @spikecurtis and the rest of your teammates on |
coderd/coderd.go
Outdated
r.Route("/derp", func(r chi.Router) { | ||
r.Get("/traffic", options.DERPServer.ServeDebugTraffic) | ||
}) | ||
r.Mount("/expvar", expvar.Handler()) // contains DERP metrics as well as cmdline and memstats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sucks that they don't expose prometheus metrics :/
We might have to write a converter from these expvar values to prometheus values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but I'll save that for a different PR if we find these useful.
64db8c6
to
e4fc41b
Compare
I'm for building a special debug image as it is not a good practice to disable readOnlyRootFS. So we've then to modify our Helm Chart or deployment for debugging purpose. |
e4fc41b
to
b792f4b
Compare
b792f4b
to
6e0b5d4
Compare
Merge activity
|
Adds some debug endpoints for looking into the DERP server.
The
api/v2/debug/derp/traffic
endpoint requires thess
utility to be present in order to function. I have not added theiproute2
package to our base image as it adds 11MB, so this endpoint won't be useful by default. However, in a debugging situation, we could exec into the container and thenapk add iproute2
, or build a special debug image.The
api/v2/debug/expvar
handler contains DERP metrics as well as commandline and memstats.Example:
If we find the DERP metrics useful we could consider how to include them in Prometheus scrapes based on the tailnet
varz
package. That's for a later PR if at all.