control/controlknobs,feature/*,ipn/ipnlocal,tailcfg: add runtimemetrics

Emit runtime metrics as clientmetrics when the
NodeAttrEmitRuntimeMetrics NodeCapability is present.

We start small with just 2 metrics: heap bytes and total process memory.

Updates tailscale/corp#39434

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited
2026-05-26 16:02:01 -07:00
committed by Jordan Whited
parent 2eb45c2457
commit e5a8cf3b18
10 changed files with 317 additions and 1 deletions
@@ -0,0 +1,13 @@
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
// Code generated by gen.go; DO NOT EDIT.
//go:build ts_omit_runtimemetrics
package buildfeatures
// HasRuntimeMetrics is whether the binary was built with support for modular feature "Support emission of runtime/metrics as clientmetrics".
// Specifically, it's whether the binary was NOT built with the "ts_omit_runtimemetrics" build tag.
// It's a const so it can be used for dead code elimination.
const HasRuntimeMetrics = false
@@ -0,0 +1,13 @@
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
// Code generated by gen.go; DO NOT EDIT.
//go:build !ts_omit_runtimemetrics
package buildfeatures
// HasRuntimeMetrics is whether the binary was built with support for modular feature "Support emission of runtime/metrics as clientmetrics".
// Specifically, it's whether the binary was NOT built with the "ts_omit_runtimemetrics" build tag.
// It's a const so it can be used for dead code elimination.
const HasRuntimeMetrics = true