Skip to content

Commit 17a9c20

Browse files
author
Serkan ÖZAL
authored
Add process tracing support (#9)
1 parent 09720eb commit 17a9c20

25 files changed

+99709
-1245
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
# workflow-telemetry-action
22

3-
A GitHub Action to track and monitor the resource metrics of your GitHub Action workflow runs. If the run is triggered via a Pull Request, it will create a comment on the connected PR with the results and/or publishes the results to the job summary. The action collects the following metrics:
3+
A GitHub Action to track and monitor the resource metrics and process activities of your GitHub Action workflow runs.
4+
If the run is triggered via a Pull Request, it will create a comment on the connected PR with the results
5+
and/or publishes the results to the job summary.
46

7+
The action collects the following metrics:
58
- CPU Load (user and system) in percentage
69
- Memory usage (used and free) in MB
710
- Network I/O (read and write) in MB
811
- Disk I/O (read and write) in MB
912

13+
And traces the process executions with the following information (only supported on `Ubuntu`):
14+
- Name
15+
- Id
16+
- Parent id
17+
- User id
18+
- Start time
19+
- Duration (in ms)
20+
- Exit code
21+
- File name
22+
- Arguments
23+
1024
### Example Output
1125

1226
An example output of a simple workflow run will look like this.
@@ -28,6 +42,8 @@ To use the action, add the following step before the steps you want to track.
2842
| --- | --- | ---
2943
| `github_token` | Optional | An alternative GitHub token, other than the default provided by GitHub Actions runner.
3044
| `stat_frequency` | Optional | Statistic collection frequency in seconds. Must be a number. Defaults to `5`.
45+
| `min_proc_duration` | Optional | Puts minimum limit for process execution duration to be traced. Must be a number. Defaults to `-1` which means process duration filtering is not applied.
46+
| `trace_sys_procs` | Optional | Enables tracing default system processes (`aws`, `cat`, `sed`, ...). Defaults to `false`.
3147
| `comment_on_pr` | Optional | Set to `true` to publish the results as comment to the PR (applicable if workflow run is triggered by PR). Defaults to `true`.
3248
| `job_summary` | Optional | Set to `true` to publish the results as part of the [job summary page](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/) of the workflow run. Defaults to `true`.
3349
| `theme` | Optional | Set to `dark` to generate charts compatible with Github **dark** mode. Defaults to `light`.

action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ inputs:
1010
description: "Statistic collection frequency in seconds. Must be a number. Defaults to '5'."
1111
default: 5
1212
required: false
13+
min_proc_duration:
14+
description: "Puts minimum limit for process execution duration to be traced. Must be a number. Defaults to '-1' which means process duration filtering is not applied."
15+
default: -1
16+
required: false
17+
trace_sys_procs:
18+
description: "Enables tracing default system processes ('aws', 'cat', 'sed', ...). Defaults to 'false'."
19+
default: 'false'
20+
required: false
1321
comment_on_pr:
1422
description: "Set to `true` to publish the results as comment to the PR (applicable if workflow run is triggered from PR). Defaults to 'true'."
1523
default: 'true'
@@ -22,6 +30,7 @@ inputs:
2230
description: "Set to `dark` to generate charts compatible with Github dark mode. Defaults to 'light'."
2331
default: 'light'
2432
required: false
33+
2534
runs:
2635
using: "node12"
2736
main: dist/main/index.js

0 commit comments

Comments
 (0)