You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: every server start warns that process group metrics are not exported, before the resource monitor is ready #38022
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Build the resource monitor (cargo build --release in native/resource-monitor) so the server can find it.
Start the server with OTLP metrics export on, for example T3CODE_OTLP_METRICS_URL=http://127.0.0.1:4318/v1/metrics t3 serve.
Watch the server log for a minute.
Expected behavior
With a working resource monitor, startup logs nothing about process group metrics, and the t3_process_group_* gauges are exported. When the monitor really is missing, the one warning from #23969 names why, for example Resource monitor binary was not found for linux/x64.
Actual behavior
Every server start logs a warning that metrics are not exported, then a recovery exactly one minute later, even though nothing is wrong:
[08:57:19.261] WARN: process group metrics are not exported: sample failed
[cause]: NativeTelemetryUnavailable: Resource monitor is unavailable: sidecar is not running
[08:58:19.269] INFO: process group metrics sample recovered
When the binary really is missing, the warning still says sidecar is not running. The real cause (Resource monitor binary was not found …) only shows up in the later failures, which #23969 logs at debug.
Root cause
ProcessGroupMetrics takes its first sample as soon as its layer starts (ProcessGroupMetrics.ts#L137-L142). At that moment the NativeTelemetryClient supervisor has only just started spawning the sidecar (NativeTelemetryClient.ts#L568): the state is still starting with no handle and no lastError (L239). So sampleNow fails with the default reason sidecar is not running (L918-L923). The first failure is the one that is logged as a warning (ProcessGroupMetrics.ts#L126-L133), so it is always this race and never the real reason.
Activity