Files
tasks/develop/github
Stephan BehnkeandGitHub 34dba36529 Capture memory monitor report before OOM crash (#9079)
## What changed?

Follow-up to https://github.com/temporalio/temporal/pull/9027

1. Print memory stats to both file and stdout (new!)
2. Print Go heap report once a memory threshold is reached (ie close to
OOM kill)
3. Add `alloc_objects` to Go heap report


See
[example](https://github.com/temporalio/temporal/actions/runs/21153910359/job/60835302610?pr=9079#step:9:89):
<img width="1328" height="1197" alt="Screenshot 2026-01-19 at 4 23
28 PM"
src="https://github.com/user-attachments/assets/fe910197-d813-4f63-8907-797c5f11bc90"
/>
(note that Go test output is buffered so they all appear mostly
sequentially)

## Why?

Gain ability to capture memory usage and Go heap report **before an OOM
kill**.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
2026-01-23 17:32:21 -08:00
..