feat: expose DERP server debug metrics #12135
Merged
+222
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.