catchpoint / workflow-telemetry-action

Github action to collect metrics (CPU, memory, I/O, etc ...) from your workflows to help you debug and optimize your CI/CD pipeline
Apache License 2.0
293 stars 39 forks source link

What are the dependencies/packages I need for this action to run? #81

Open vmilosevic opened 6 days ago

vmilosevic commented 6 days ago

Hi, first of all this is a great action for GH. When running on Github runner it works great, however, it has problems running inside the docker image. At first it couldn't start inside the docker, until I added "sudo" to Ubuntu docker image. Now I can see "Step Trace" chart, "Process Trace" is showing but without information, and memory, CPU etc are not showing at all.

I can see some errors in the log:

[Workflow Telemetry] Finishing step tracer ...
[Workflow Telemetry] Finished step tracer
[Workflow Telemetry] Finishing stat collector ...
##[debug][Workflow Telemetry] Triggering stat collect ...
Error: [Workflow Telemetry] Unable to finish stat collector
Error: [Workflow Telemetry] Error
Error: Error: connect ECONNREFUSED 1[27](https://github.com/tenstorrent/tt-forge-fe/actions/runs/11708889180/job/32615279929#step:28:27).0.0.1:7777
[Workflow Telemetry] Finishing process tracer ...
##[debug][Workflow Telemetry] Interrupting process tracer with pid 1478 to stop gracefully ...
[Workflow Telemetry] Finished process tracer
[Workflow Telemetry] Reporting step tracer result ...
[Workflow Telemetry] Reported step tracer result
[Workflow Telemetry] Reporting stat collector result ...
##[debug][Workflow Telemetry] Getting CPU stats ...
Error: [Workflow Telemetry] Unable to report stat collector result
Error: [Workflow Telemetry] Error
Error: Error: connect ECONNREFUSED 127.0.0.1:7777
[Workflow Telemetry] Reporting process tracer result ...

The "start" step in the workflow doesn't show any errors.

I suppose I need to add some packages to Ubuntu for this to work, do you maybe know which one? Thanks!

borissmidt commented 3 days ago

This action uses EBPF to trace two system calls so the correct way to run it is actually:

sudo docker run --privileged -ti catthehacker/ubuntu:act-latest /bin/bash -v /sys/:/sys/  

This mounts the system tracepoints (/sys/) part into the docker image and it gives it root access rights. Allowing the tracer to hook into the system.