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
Extends the existing nodejs.* OTel gauges in tracer.server.ts with direct
V8 heap + process memory readings via v8.getHeapStatistics() and
process.memoryUsage():
- nodejs.memory.heap.used - V8 heap used after last GC
- nodejs.memory.heap.total - V8 heap reserved
- nodejs.memory.heap.limit - configured max-old-space-size
- nodejs.memory.external - C++ objects bound to JS (Buffer, etc.)
- nodejs.memory.array_buffers - ArrayBuffer/SharedArrayBuffer memory
- nodejs.memory.rss - resident set size
@opentelemetry/host-metrics already publishes process.memory.usage (RSS),
but RSS overstates V8 heap by the external + native footprint. Without a
direct heap metric it's impossible to size NODE_MAX_OLD_SPACE_SIZE against
actual V8 usage. These gauges land in the same trigger.dev scope and
carry the same per-worker tags (process.executable.name,
service.instance.id) so they're queryable alongside the existing
event-loop + handle metrics on a per-cluster-worker basis.
Add per-worker Node.js heap metrics to the OTel meter — `nodejs.memory.heap.used`, `nodejs.memory.heap.total`, `nodejs.memory.heap.limit`, `nodejs.memory.external`, `nodejs.memory.array_buffers`, `nodejs.memory.rss`. Host-metrics only publishes RSS, which overstates V8 heap by the external + native footprint; these give direct heap visibility per cluster worker so `NODE_MAX_OLD_SPACE_SIZE` can be sized against observed heap peaks rather than RSS.
0 commit comments