Skip to content

Commit 53c28b8

Browse files
authored
docs: Improve task previousTrace documentation (#6538)
--------- Signed-off-by: Rashmi Naidu <[email protected]> Signed-off-by: Chris Hakkaart <[email protected]> Signed-off-by: Ben Sherman <[email protected]>
1 parent 064f57f commit 53c28b8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/process.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,11 @@ process hello {
13381338
}
13391339
```
13401340

1341-
In the above example, the {ref}`process-memory` is set according to previous trace record metrics. In the first attempt, when no trace metrics are available, it is set to 1 GB. In each subsequent attempt, the requested memory is doubled. See {ref}`trace-report` for more information about trace records.
1341+
In the above example, the {ref}`process-memory` is set according to previous trace record metrics. In the first attempt, when no trace metrics are available, it is set to 1 GB. In each subsequent attempt, the requested memory is doubled.
1342+
1343+
:::{note}
1344+
Many fields from the previous task attempts are accessible. See {ref}`trace-report` for a list of available fields.
1345+
:::
13421346

13431347
### Dynamic retry with backoff
13441348

docs/reference/process.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ The following task properties are defined in the process body:
3737
: :::{versionadded} 24.10.0
3838
:::
3939
: The trace record associated with the previous task attempt.
40-
: Since the trace record is available after a failed task attempt, it can only be accessed when retrying a failed task execution, i.e., when `task.attempt` is greater than 1.
40+
: Since the trace record is available after a failed task attempt, it can only be accessed when retrying a failed task execution, i.e., when `task.attempt` is greater than 1. See {ref}`trace-report` for a list of available fields.
41+
42+
: :::{note}
43+
The trace fields `%cpu` and `%mem` can be accessed as `pcpu` and `pmem`, respectively.
44+
:::
45+
4146

4247
`task.process`
4348
: The name of the process that spawned the task.

0 commit comments

Comments
 (0)