Skip to main content
After this page you can turn on the worker’s telemetry log and read each of its fields, so you can tell from your logs whether a worker is healthy, running out of memory, or held up by a slow hook. Some worker problems never raise an error. Memory grows until the container kills the process, a hook destination stalls and callbacks pile up, or a poller stops and the worker quietly takes no new work. The worker writes two telemetry records that make these visible: a Worker sizing record once at startup, and a Worker record at a fixed interval.

Turn It On

The periodic record is off by default. Set the interval in milliseconds:
.env
The worker now logs one Worker record a minute. 0 turns it off. The Worker sizing record is always logged at startup, whatever the interval. Both records go through the worker’s logger under the Telemetry namespace, so they reach the same log pipeline as the rest of the worker’s output. The examples below show the production JSON format.

The Periodic Record

The record has three blocks: status says what the worker is doing, memory says how much room it has left, and pendingHooks says whether your hook handlers keep up. This example shows a healthy worker with one problem: eight onLLMRequest callbacks have been waiting for up to 31 seconds.

status

These fields come straight from Temporal’s Worker.getStatus().

memory

The memory fields mix two scopes. Some cover the whole process, others only the main thread’s V8 isolate. The worker runs workflow code in separate threads, each with its own isolate, so the main isolate is never the whole picture. In practice this means:
  • availableMemory falling over time is the early warning for an out-of-memory kill.
  • heapUsed growing points at the main thread, where your steps and hook handlers run.
  • nonMainHeap growing while heapUsed stays flat points at the workflow threads, usually the sticky cache. Cached workflow memory is counted here, so it grows with numCachedWorkflows.
Worker Tuning covers what to change in each case.

pendingHooks

Every hook handler you register runs in the background: the worker starts it and moves on without waiting. A callback is pending from the moment it starts until it finishes or fails. A handler that awaits a slow destination, such as an HTTP endpoint or a paused Redis, stays pending, and it keeps its payload in memory while it waits. When nothing is pending, count is 0 and both ages are null, because there is no callback to measure. Healthy handlers finish in milliseconds, so count stays near 0 from one record to the next. Watch for:
  • count climbing across records: callbacks start faster than they finish. Memory grows with them, so check availableMemory too.
  • A large oldestAgeMs: at least one callback is stuck, typically a request with no timeout.
  • One name dominating perName: that hook’s destination is the slow one. In the example above, onLLMRequest holds eight callbacks up to 31 seconds old, while onHttpCost finishes almost immediately.
Pending callbacks also matter at shutdown: the worker waits for them for up to OUTPUT_HOOK_FLUSH_TIMEOUT_MS, then exits without them. See Worker Shutdown. To keep handlers fast, follow the guidance in Hooks.

The Sizing Record

At startup, the worker logs how much memory it could commit and how big its workflow cache is:
Each value is the one the worker resolved, not the one you requested. The worker follows the record with a warning when the numbers don’t fit:
projectedCommittedHeap is above memoryLimit, so the isolates together can grow past the container. Lower the heap cap in NODE_OPTIONS or the thread count.
workflowTaskSlots is above maxCachedWorkflows, so concurrent tasks evict each other’s workflows from the cache and the worker replays their history to recover. Raise TEMPORAL_MAX_CACHED_WORKFLOWS or lower TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASK_EXECUTIONS. Memory and Isolates explains both trade-offs in depth.

Next Steps

Worker Tuning

Concurrency, polling, and memory settings for the worker.

Worker Shutdown

How the worker drains on a deploy, including pending hook callbacks.